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

From Amit Kapila
Subject Re: [HACKERS] Fix GetOldestXmin comment
Date
Msg-id CAA4eK1L08j7Pd1T4AFHZm6t5Yq8Ciy93YXhn9vaBGJJoJJZ2_w@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Fix GetOldestXmin comment  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: [HACKERS] Fix GetOldestXmin comment  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
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.


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH] relocation truncated to fit: citus buildfailure on s390x
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x