For a long time hash indexed were not crash safe, and couldn't be used on replication slave, because they skipped WAL. Now, thanks to these two commits, it has changed:
On 14th of March 2017, Robert Haas committed patch:
hash: Add write-ahead logging support.
The warning about hash indexes not being write-ahead logged and their
use being discouraged has been removed. "snapshot too old" is now
supported for tables with hash indexes. Most importantly, barring
bugs, hash indexes will now be crash-safe and usable on standbys.
This commit doesn't yet add WAL consistency checking for hash
indexes, as we now have for other index types; a separate patch has
been submitted to cure that lack.
Amit Kapila, reviewed and slightly modified by me. The larger patch
series of which this is a part has been reviewed and tested by Álvaro
Herrera, Ashutosh Sharma, Mark Kirkwood, Jeff Janes, and Jesper
and then, ~ 13 hours later, Robert committed also:
hash: Support WAL consistency checking.
Kuntal Ghosh, reviewed by Amit Kapila and Ashutosh Sharma, with
a few tweaks by me.
Continue reading Waiting for PostgreSQL 10 – hash indexing vs. WAL
On 25th of January, Heikki Linnakangas committed patch:
Add recovery_target='immediate' option.
This allows ending recovery as a consistent state has been reached. Without
this, there was no easy way to e.g restore an online backup, without
replaying any extra WAL after the backup ended.
MauMau and me.
Continue reading Waiting for 9.4 – Add recovery_target='immediate' option.
As of yesterday OmniPITR got following changes/fixes:
- Fixed bug which caused immediate finish request be treated the same as smart finish request.
- Fixed problem with using omnipitr-backup-slave on PostgreSQL 9.0 slave, which is using streaming replication.
- Added option to omnipitr-restore, so that you can now use it for streaming-replication slaves
I'm very ashamed of the first thing (smart/immediate finish request), as it was simply my lack of test.
Second thing – the problem was that with streaming replication slave behaves a bit differently than normally, and so the backup procedure had to be modified.
As for third – restore command in streaming replication environment has to behave differently than normal restore command – i.e. it should finish, with error, as soon as it will be called for wal file that does not exist in wal archive. Which is direct opposite of what should be done normally.
Now, omnipitr-restore got switch (-sr) to make it work correctly in SR situation.
Links for svn/docs are listed on project page.
I tend to write about new features in new versions of PostgreSQL, but this patch actually fixes one of the things that annoy me a lot, so here it goes:
On 26th of January, Simon Riggs committed:
Fix longstanding gripe that we check for 0000000001.history at start of
archive recovery, even when we know it is never present.
If you've ever tried to roll your own restore_command script ( like pg_standby ) then you know that to the algorithm that's presented in docs You always had to add special case for file “0000000001.history" – which was never there, but somehow PostgreSQL always asked for it – despite the fact that it could never arrive.
Now, thanks to this small patch we will no longer need to add this “if" in any script. It's small, and it's not a new feature, but I am SO happy to see it.