Does anyone really know what time it is?
PostgreSQL has a variety of ways of telling time: now(), statement_timestamp(), and clock_timestamp(). Each has a different sense of when “now” is:
PostgreSQL has a variety of ways of telling time: now(), statement_timestamp(), and clock_timestamp(). Each has a different sense of when “now” is:
(This is another intermittent series of small things that are easy to forget, and cause irritation in the PostgreSQL world…)
Since version 1.7, pgbouncer has had built-in TLS support. This is very handy, since the previous versions required stunnel or something similar to provide TLS.
Frequently, either for test purposes or because you’re in an environment where checking
pg_rewind, introduced in PostgreSQL 9.5, is a powerful utility solving a particular problem: If you have a promoted a streaming replication secondary into being a primary, how can you make sure that the former primary, and any other secondaries that used to be connected to it, are able to connect to the new primary? Previously, there was no entirely
Google recently released a tool to check on-disk checksums in PostgreSQL. PostgreSQL being hot, and Google being Google, this generated a lot of press, much of it containing an element of FUD about the integrity of PostgreSQL backups (note that Google’s own announcements were quite straight-forward about it).
(This is another intermittent series of small things that are easy to forget, and cause irritation in the PostgreSQL world…)
When setting up pgpool, it’s common to tweak the configuration file repeatedly… and often get a hostname wrong. One common occurrence is then:
The slides from my talk on PostgreSQL Replication at PerconaLive 2018 are available.
(An intermittent series on PostgreSQL parameters whose default settings you should change.)
wal_level = logical
wal_level controls how much information is written into the write-ahead log. Higher settings write more information, enabling more features, at the expense of (somewhat) larger write-ahead log volume.
Just set it to logical, the highest setting. The incremental volume
(An intermittent series on PostgreSQL parameters whose default settings you should change.)
Here’s my preferred logging configuration:
(An intermittent series on PostgreSQL parameters whose default settings you should change.)
By default archive_mode is set to off, and thus archive_command is ignored. Even if you are not going to be using WAL archiving, you should change these. You can use settings such as:
archive_mode = on
archive_command = '/bin/true'
(An intermittent series on PostgreSQL parameters whose default settings you should change.)
Introduced in PostgreSQL 9.5, wal_compression is off by default, but you should probably turn it on.
First, what does it do? The documentation helpfully explains:
When this parameter is on, the PostgreSQL server compresses a full page image written to WAL when
full_page_writesis