Content-Length: 256065 | pFad | http://github.com/postgres/postgres/commit/0e0174b4973af2982498c33f7911312250b330ca

FF Fix incorrect WAL description for PREPARE TRANSACTION record. · postgres/postgres@0e0174b · GitHub
Skip to content

Commit 0e0174b

Browse files
committed
Fix incorrect WAL description for PREPARE TRANSACTION record.
Since commit 8b1dccd, the PREPARE TRANSACTION WAL record includes information about dropped statistics entries. However, the WAL resource manager description function for PREPARE TRANSACTION record failed to parse this information correctly and always assumed there were no such entries. As a result, for example, pg_waldump could not display the dropped statistics entries stored in PREPARE TRANSACTION records. The root cause was that ParsePrepareRecord() did not set the number of statistics entries to drop on commit or abort. These values remained zero-initialized and were never updated from the parsed record. This commit fixes the issue by properly setting those values during parsing. With this fix, pg_waldump can now correctly report dropped statistics entries in PREPARE TRANSACTION records. Back-patch to v15, where commit 8b1dccd was introduced. Author: Daniil Davydov <3danissimo@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAJDiXgh-6Epb2XiJe4uL0zF-cf0_s_7Lw1TfEHDMLzYjEmfGOw@mail.gmail.com Backpatch-through: 15
1 parent 009e8a8 commit 0e0174b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/rmgrdesc/xactdesc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ ParsePrepareRecord(uint8 info, xl_xact_prepare *xlrec, xl_xact_parsed_prepare *p
252252
parsed->nsubxacts = xlrec->nsubxacts;
253253
parsed->nrels = xlrec->ncommitrels;
254254
parsed->nabortrels = xlrec->nabortrels;
255+
parsed->nstats = xlrec->ncommitstats;
256+
parsed->nabortstats = xlrec->nabortstats;
255257
parsed->nmsgs = xlrec->ninvalmsgs;
256258

257259
strncpy(parsed->twophase_gid, bufptr, xlrec->gidlen);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgres/postgres/commit/0e0174b4973af2982498c33f7911312250b330ca

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy