Re: pg_waldump and PREPARE
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Michael Paquier <michael@paquier.xyz>, Alvaro Herrera <alvherre@2ndquadrant.com>,
Thomas Munro <thomas.munro@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>, vignesh C <vignesh21@gmail.com>
Date: 2019-11-11T04:21:28Z
Lists: pgsql-hackers
Attachments
- prepare-xact-desc_v3.patch (application/octet-stream) patch v3
On Fri, Nov 8, 2019 at 1:33 PM Andrey Lepikhov <a.lepikhov@postgrespro.ru> wrote: > > > > On 08/11/2019 09:26, Kyotaro Horiguchi wrote: > > Hello. > > > > At Fri, 8 Nov 2019 08:23:41 +0500, Andrey Lepikhov <a.lepikhov@postgrespro.ru> wrote in > >>> Can I switch the status back to "Needs review"? > >>> Regards, > >>> > >> > >> One issue is that your patch provides small information. WAL errors > >> Investigation often requires information on xid, subxacts, > >> delete-on-abort/commit rels; rarely - invalidation messages etc. Thanks for the review! xid is already included in the pg_waldump output for PREPARE TRANSACTION record. Regarding subxacts, rels and invals, I agree that they might be useful when diagnosing 2PC-related trouble. I attached the updated version of the patch that also changes pg_waldump so that it outputs delete-on-commit rels, delete-on-aborts, subxacts and invals. Here is the example of output for PREPARE TRASACTION record, with the pach. rmgr: Transaction len (rec/tot): 837/ 837, tx: 503, lsn: 0/030055C8, prev 0/03005588, desc: PREPARE gid xxx: 2019-11-11 13:00:18.616056 JST; rels(commit): base/12923/16408 base/12923/16407 base/12923/16406 base/12923/16405; rels(abort): base/12923/16412 base/12923/16411 base/12923/16408 base/12923/16407; subxacts: 505; inval msgs: catcache 50 catcache 49 catcache 50 catcache 49 catcache 50 catcache 49 catcache 50 catcache 49 catcache 50 catcache 49 catcache 50 catcache 49 relcache 16386 relcache 16390 relcache 16390 relcache 16386 relcache 16386 relcache 16390 relcache 16390 relcache 16386 > By the way, in the patch xact_desc_prepare seems printing > parseed.xact_time, which is not actually set by ParsePrepareRecord. Thanks for the review! You are right. I fixed this issue in the attached patch. Regards, -- Fujii Masao
Commits
-
Fix comment in xact.h
- f9cb8bd3f217 13.0 landed
-
Make pg_waldump report more detail information about PREPARE TRANSACTION record.
- 7b8a899bdeb6 13.0 landed
-
Store 2PC GID in commit/abort WAL recs for logical decoding
- 1eb6d6527aae 11.0 cited