diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-03-25 14:59:58 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-03-25 14:59:58 +0200 |
commit | f83d709760d84253b539ee454ce9ce1ceb9ad9ac (patch) | |
tree | faab56d6b5fc4c320ff10838238cbb2a14588409 /src/backend/access/gist/gistxlog.c | |
parent | d44032d0146306971cd5ccf232fe37269717d6f2 (diff) | |
download | postgresql-f83d709760d84253b539ee454ce9ce1ceb9ad9ac.tar.gz postgresql-f83d709760d84253b539ee454ce9ce1ceb9ad9ac.zip |
Merge prune, freeze and vacuum WAL record formats
The new combined WAL record is now used for pruning, freezing and 2nd
pass of vacuum. This is in preparation for changing VACUUM to write a
combined prune+freeze record per page, instead of separate two
records. The new WAL record format now supports that, but the code
still always writes separate records for pruning and freezing.
This reserves separate XLOG_HEAP2_* info codes for when the pruning
record is emitted for on-access pruning or VACUUM, per Peter
Geoghegan's suggestion. The record format is identical, but having
separate info codes makes it easier analyze pruning and vacuuming with
pg_waldump.
The function to emit the new WAL record, log_heap_prune_and_freeze(),
is in pruneheap.c. The existing heap_log_freeze_plan() and its
subroutines are moved to pruneheap.c without changes, to keep them
together with log_heap_prune_and_freeze().
Author: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAAKRu_azf-zH%3DDgVbquZ3tFWjMY1w5pO8m-TXJaMdri8z3933g@mail.gmail.com
Discussion: https://www.postgresql.org/message-id/CAAKRu_b2oE4GL%3Dq4g9mcByS9yT7wTQvEH9OLpabj28e%2BWKFi2A@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
-rw-r--r-- | src/backend/access/gist/gistxlog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c index fafd9f1c94f..451e8d8d98e 100644 --- a/src/backend/access/gist/gistxlog.c +++ b/src/backend/access/gist/gistxlog.c @@ -183,10 +183,10 @@ gistRedoDeleteRecord(XLogReaderState *record) * * GiST delete records can conflict with standby queries. You might think * that vacuum records would conflict as well, but we've handled that - * already. XLOG_HEAP2_PRUNE records provide the highest xid cleaned by - * the vacuum of the heap and so we can resolve any conflicts just once - * when that arrives. After that we know that no conflicts exist from - * individual gist vacuum records on that index. + * already. XLOG_HEAP2_PRUNE_VACUUM_SCAN records provide the highest xid + * cleaned by the vacuum of the heap and so we can resolve any conflicts + * just once when that arrives. After that we know that no conflicts + * exist from individual gist vacuum records on that index. */ if (InHotStandby) { |