This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| max_connections = 1500 # (change requires restart) | |
| shared_buffers = 12000MB # min 128kB, based on 80GB RAM DB | |
| temp_buffers = 8MB # min 800kB | |
| work_mem = 64MB # min 64kB | |
| maintenance_work_mem = 512MB # min 1MB | |
| wal_level = hot_standby # minimal, archive, or hot_standby | |
| checkpoint_segments = 64 # in logfile segments, min 1, 16MB each | |
| checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 | |
| max_wal_senders = 6 # max number of walsender processes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package enum_example | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| ) | |
| // TaskState represents the state of task, moving through Created, Running then Finished or Errorred | |
| type TaskState int |
OlderNewer