Re: GIN logging GIN_SEGMENT_UNMODIFIED actions?

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN logging GIN_SEGMENT_UNMODIFIED actions?
Date: 2016-08-29 09:35:18
Message-ID: CAHGQGwFA4N3n9TOOyHUzocsrRRQtiN_9=BxPDSc=KFak2AXs_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 26, 2016 at 11:35 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Tue, May 10, 2016 at 9:57 PM, Alexander Korotkov
> <a(dot)korotkov(at)postgrespro(dot)ru> wrote:
>> Hi!
>>
>> On Mon, May 9, 2016 at 10:46 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>>
>>> trying to debug something I saw the following in pg_xlogdump output:
>>>
>>> rmgr: Gin len (rec/tot): 0/ 274, tx: 0, lsn:
>>> 1C/DF28AEB0, prev 1C/DF289858, desc: VACUUM_DATA_LEAF_PAGE 3 segments: 5
>>> unknown action 0 ???, blkref #0: rel 1663/16384/16435 blk 310982
>>>
>>> note the "segments: 5 unknown action 0 ???" bit. That doesn't seem
>>> right, given:
>>> #define GIN_SEGMENT_UNMODIFIED 0 /* no action (not used in
>>> WAL records) */
>>
>>
>> I've checked GIN code. Have no idea of how such wal record could be
>> generated...
>
> I encountered the same issue when executing the following queries and
> running pg_xlogdump.

ISTM that the cause of this issue is that gin_desc() uses XLogRecGetData() to
extract ginxlogVacuumDataLeafPage data from XLOG_GIN_VACUUM_DATA_LEAF_PAGE
record. Since it's registered by XLogRegisterBufData() in
ginVacuumPostingTreeLeaf(),
XLogRecGetBlockData() should be used, instead. Patch attached. Thought?

BTW, in REDO side, ginRedoVacuumDataLeafPage() uses XLogRecGetBlockData()
to extract ginxlogVacuumDataLeafPage data.

Regards,

--
Fujii Masao

Attachment Content-Type Size
gin-bug.patch text/x-patch 708 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2016-08-29 09:37:06 Re: Renaming of pg_xlog and pg_clog
Previous Message Craig Ringer 2016-08-29 08:56:57 Re: PostgreSQL Version 10, missing minor version