Re: BUG #16931: source code problem about commit_ts - Mailing list pgsql-bugs

From Andy Fan
Subject Re: BUG #16931: source code problem about commit_ts
Date
Msg-id 87ecuzmkqf.fsf@163.com
Whole thread Raw
In response to Re: BUG #16931: source code problem about commit_ts  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: BUG #16931: source code problem about commit_ts
List pgsql-bugs
Fujii Masao <masao.fujii@oss.nttdata.com> writes:

Hi,

> On 2021/04/10 7:42, Alvaro Herrera wrote:
>> On 2021-Mar-24, Fujii Masao wrote:
>> 
>>> diff --git a/src/backend/access/rmgrdesc/committsdesc.c b/src/backend/access/rmgrdesc/committsdesc.c
>>> index 7ebd3d35ef..26bad44b96 100644
>>> --- a/src/backend/access/rmgrdesc/committsdesc.c
>>> +++ b/src/backend/access/rmgrdesc/committsdesc.c
>>> @@ -38,31 +38,6 @@ commit_ts_desc(StringInfo buf, XLogReaderState *record)
>>>           appendStringInfo(buf, "pageno %d, oldestXid %u",
>>>                            trunc->pageno, trunc->oldestXid);
>>>       }
>>> -    else if (info == COMMIT_TS_SETTS)
>> You have not pushed this one, right?  I think we should do it now.
>
> Thanks for the ping! Pushed!

Did this commit(08aa89b326261b669648df97d4f2a6edba22d26a) forget to
remove struct xl_commit_ts_set? After it, there is no reference to
xl_commit_ts_set. So Is it better clean them as well? 

typedef struct xl_commit_ts_set
{
    TimestampTz timestamp;
    RepOriginId nodeid;
    TransactionId mainxid;
    /* subxact Xids follow */
}            xl_commit_ts_set;

#define SizeOfCommitTsSet    (offsetof(xl_commit_ts_set, mainxid) + \

(When going through commit_ts.h, these code makes me think there is a
dedicated xlog for commit_ts, but the fact isn't, the commit_ts is
recorded in xl_xact_commit, removing dead code could be useful for such
case).

-- 
Best Regards
Andy Fan


Attachment

pgsql-bugs by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: BUG #18974: Postgresql repeatable crash after pg_upgrade from 15 to 17.5 version in postgresql_fdw queries
Next
From: Masahiko Sawada
Date:
Subject: Re: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5