pgsql: Fix a couple of bugs with wal_log_hints. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix a couple of bugs with wal_log_hints.
Date
Msg-id E1Z8QBE-0001fn-M6@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix a couple of bugs with wal_log_hints.

1. Replay of the WAL record for setting a bit in the visibility map
contained an assertion that a full-page image of that record type can only
occur with checksums enabled. But it can also happen with wal_log_hints, so
remove the assertion. Unlike checksums, wal_log_hints can be changed on the
fly, so it would be complicated to figure out if it was enabled at the time
that the WAL record was generated.

2. wal_log_hints has the same effect on the locking needed to read the LSN
of a page as data checksums. BufferGetLSNAtomic() didn't get the memo.

Backpatch to 9.4, where wal_log_hints was added.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/b6c4b58ac52aa9046c45bd8c2c9fc8925087c8d3

Modified Files
--------------
src/backend/access/heap/heapam.c    |   15 +++++++--------
src/backend/storage/buffer/bufmgr.c |    2 +-
2 files changed, 8 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Allow background workers to connect to no particular database.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix a couple of bugs with wal_log_hints.