mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Still more code review for single-page hash vacuuming.
Most seriously, fix use of incorrect block ID, per a report from Jeff Janes that it causes a crash and a diagnosis from Amit Kapila. Improve consistency between the hash and btree versions of this code by adding back a PANIC that btree has, and by registering data in the xlog record in the same way, per complaints from Jeff Janes and Amit Kapila. Tidy up some minor cosmetic points, per complaints from Amit Kapila. Patch by Ashutosh Sharma, reviewed by Amit Kapila, and tested by Jeff Janes. Discussion: http://postgr.es/m/CAMkU=1w-9Qe=Ff1o6bSaXpNO9wqpo7_9GL8_CVhw4BoVVHasqg@mail.gmail.com
This commit is contained in:
@@ -265,11 +265,13 @@ typedef struct xl_hash_init_bitmap_page
|
||||
typedef struct xl_hash_vacuum_one_page
|
||||
{
|
||||
RelFileNode hnode;
|
||||
double ntuples;
|
||||
int ntuples;
|
||||
|
||||
/* TARGET OFFSET NUMBERS FOLLOW AT THE END */
|
||||
} xl_hash_vacuum_one_page;
|
||||
|
||||
#define SizeOfHashVacuumOnePage \
|
||||
(offsetof(xl_hash_vacuum_one_page, ntuples) + sizeof(double))
|
||||
(offsetof(xl_hash_vacuum_one_page, ntuples) + sizeof(int))
|
||||
|
||||
extern void hash_redo(XLogReaderState *record);
|
||||
extern void hash_desc(StringInfo buf, XLogReaderState *record);
|
||||
|
Reference in New Issue
Block a user