postgresql/src/backend/storage
Andres Freund 43a33ef54e Support RBM_ZERO_AND_CLEANUP_LOCK in ExtendBufferedRelTo(), add tests
For some reason I had not implemented RBM_ZERO_AND_CLEANUP_LOCK support in
ExtendBufferedRelTo(), likely thinking it not being reachable. But it is
reachable, e.g. when replaying a WAL record for a page in a relation that
subsequently is truncated (likely only reachable when doing crash recovery or
PITR, not during ongoing streaming replication).

As now all of the RBM_* modes are supported, remove assertions checking mode.

As we had no test coverage for this scenario, add a new TAP test. There's
plenty more that ought to be tested in this area...

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/392271.1681238924%40sss.pgh.pa.us
Discussion: https://postgr.es/m/0b5eb82b-cb99-e0a4-b932-3dc60e2e3926@gmail.com
2023-04-14 11:30:33 -07:00
..
buffer Support RBM_ZERO_AND_CLEANUP_LOCK in ExtendBufferedRelTo(), add tests 2023-04-14 11:30:33 -07:00
file Add io_direct setting (developer-only). 2023-04-08 16:35:07 +12:00
freespace
ipc Handle logical slot conflicts on standby 2023-04-08 00:05:44 -07:00
large_object
lmgr
page Introduce PG_IO_ALIGN_SIZE and align all I/O buffers. 2023-04-08 16:34:50 +12:00
smgr Add io_direct setting (developer-only). 2023-04-08 16:35:07 +12:00
sync
Makefile
meson.build