Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0bd762e

Browse files
committed
Fix incorrect WAL description for PREPARE TRANSACTION record.
Since commit8b1dccd, the PREPARE TRANSACTION WAL record includesinformation about dropped statistics entries. However, the WAL resourcemanager description function for PREPARE TRANSACTION record failed toparse this information correctly and always assumed there wereno such entries.As a result, for example, pg_waldump could not display the droppedstatistics entries stored in PREPARE TRANSACTION records.The root cause was that ParsePrepareRecord() did not set the number ofstatistics entries to drop on commit or abort. These values remainedzero-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 statisticsentries in PREPARE TRANSACTION records.Back-patch to v15, where commit8b1dccd 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.comBackpatch-through: 15
1 parent06450c7 commit0bd762e

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)

[8]ページ先頭

©2009-2025 Movatter.jp