Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/backend/commands/vacuum_ao.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,14 @@ ao_vacuum_rel_pre_cleanup(Relation onerel, VacuumParams *params, BufferAccessStr
*/
ao_vacuum_rel_recycle_dead_segments(onerel, params, bstrategy, vacrelstats);

/*
* Make the pg_aoseg updates above visible to AppendOptimizedTruncateToEOF's
* catalog snapshot; without this the zeroed-eof rows are invisible (same
* CommandId) and the old non-zero-eof rows appear live, triggering "file
* size smaller than logical eof".
*/
CommandCounterIncrement();

/*
* Also truncate all live segments to the EOF values stored in pg_aoseg.
* This releases space left behind by aborted inserts.
Expand Down
Loading