]> granicus.if.org Git - postgresql/commitdiff
hash: Fix write-ahead logging bug.
authorRobert Haas <rhaas@postgresql.org>
Wed, 5 Apr 2017 15:45:35 +0000 (11:45 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 5 Apr 2017 15:45:35 +0000 (11:45 -0400)
The size of the data is not the same thing as the size of the size of
the data.

Reported off-list by Tushar Ahuja.  Fix by Ashutosh Sharma, reviewed
by Amit Kapila.

Discussion: http://postgr.es/m/CAE9k0PnmPDXfvf8HDObme7q_Ewc4E26ukHXUBPySoOs0ObqqaQ@mail.gmail.com

src/backend/access/hash/hash.c

index b835f772d46aaec5c43729b924ae64a88bff132a..80923611bb368933b33490f7397fc0ada65b5a71 100644 (file)
@@ -707,7 +707,7 @@ loop_top:
                xlrec.ntuples = metap->hashm_ntuples;
 
                XLogBeginInsert();
-               XLogRegisterData((char *) &xlrec, sizeof(SizeOfHashUpdateMetaPage));
+               XLogRegisterData((char *) &xlrec, SizeOfHashUpdateMetaPage);
 
                XLogRegisterBuffer(0, metabuf, REGBUF_STANDARD);