Monday 29 October 2018

Tuning PG

Our upgrade to Postgresql 10 went badly due to parallel queries. If Postgres 10 performance sucks then try turning off parallel queries.

This site generates a tuned pg config for you based on your system:
 https://pgtune.leopard.in.ua/#/

Attempt to configure your Wall-E database backs so they back up on a a time frequency not size frequency by tuning:  max_wal_size


PG Logging:

Things you really should turn on for your PG logs:
https://www.postgresql.org/docs/9.5/runtime-config-logging.html


log_lock_waits

* This is useful in determining if lock waits are causing poor performance.

log_statement(ddl)

* Logs statements changing the DB

log_min_duration_statement

* Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of milliseconds.  
 

No comments:

Post a Comment