mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Fixes for single-page hash index vacuum.
Clear LH_PAGE_HAS_DEAD_TUPLES during replay, similar to what gets done
for btree. Update hashdesc.c for xl_hash_vacuum_one_page.
Oversights in commit 6977b8b7f4 spotted
by Amit Kapila. Patch by Ashutosh Sharma.
Bump WAL version. The original patch to make hash indexes write-ahead
logged probably should have done this, and the single page vacuuming
patch probably should have done it again, but better late than never.
Discussion: http://postgr.es/m/CAA4eK1Kd=mJ9xreovcsh0qMiAj-QqCphHVQ_Lfau1DR9oVjASQ@mail.gmail.com
This commit is contained in:
@@ -96,7 +96,8 @@ hash_desc(StringInfo buf, XLogReaderState *record)
|
||||
{
|
||||
xl_hash_delete *xlrec = (xl_hash_delete *) rec;
|
||||
|
||||
appendStringInfo(buf, "is_primary %c",
|
||||
appendStringInfo(buf, "clear_dead_marking %c, is_primary %c",
|
||||
xlrec->clear_dead_marking ? 'T' : 'F',
|
||||
xlrec->is_primary_bucket_page ? 'T' : 'F');
|
||||
break;
|
||||
}
|
||||
@@ -104,6 +105,14 @@ hash_desc(StringInfo buf, XLogReaderState *record)
|
||||
{
|
||||
xl_hash_update_meta_page *xlrec = (xl_hash_update_meta_page *) rec;
|
||||
|
||||
appendStringInfo(buf, "ntuples %g",
|
||||
xlrec->ntuples);
|
||||
break;
|
||||
}
|
||||
case XLOG_HASH_VACUUM_ONE_PAGE:
|
||||
{
|
||||
xl_hash_vacuum_one_page *xlrec = (xl_hash_vacuum_one_page *) rec;
|
||||
|
||||
appendStringInfo(buf, "ntuples %g",
|
||||
xlrec->ntuples);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user