Re: [HACKERS] Fix GetOldestXmin comment - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: [HACKERS] Fix GetOldestXmin comment
Date
Msg-id CAD21AoDM9FQ7n_b9HTSjFMhJKhsWdS2sp61T1nov7CnqEZZfSw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Fix GetOldestXmin comment  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Tue, May 30, 2017 at 11:07 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Tue, May 30, 2017 at 6:32 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>> Hi,
>>
>> While reading source code, I realized that comment of GetOldestXmin mentions;
>>
>>   * if rel = NULL and there are no transactions running in the current
>>   * database, GetOldestXmin() returns latestCompletedXid.
>>
>> However, in that case if I understand correctly GetOldestXmin()
>> actually returns latestCompletedXid + 1 as follows;
>>
>
> Isn't there another gotcha in above part of the comment, shouldn't it
> say rel != NULL?  AFAICS, when rel is NULL, it considers all databases
> not only current database.
>

Hmm it could return latestCompletedXid in that case. I think I
understood now, Thank you!

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is comingfor table which is already removed
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Replication status in logical replication