Re: Temporary tables prevent autovacuum, leading to XID wraparound - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Temporary tables prevent autovacuum, leading to XID wraparound
Date
Msg-id 20180808191117.GC13638@paquier.xyz
Whole thread Raw
In response to Re: Temporary tables prevent autovacuum, leading to XID wraparound  (Andres Freund <andres@anarazel.de>)
Responses Re: Temporary tables prevent autovacuum, leading to XID wraparound
List pgsql-hackers
Hi Andres,

(Not my intention to miss your message, I have just noticed it.)

On Wed, Aug 08, 2018 at 01:41:27AM -0700, Andres Freund wrote:
> I can't parse this. "Even if this is an atomic operation, this can be
> safely done lock-less" - that seems like a contradictory sentence. Is
> there a "not" missing?

Yes, a "not" has gone missing here.  I reworked the comment block as
mentioned upthread.

> Also, this seems like insufficient reasoning. What guarantees the
> visibility of the flag? You're going to have to talk about externally
> implied memory ordering here.  Or add explicit barriers - the latter is
> probably preferrable.

Well, we use BackendIdGetProc() in this case, where we could finish with
information out-of-date pretty quickly, and there is no special
reasoning for backendId and databaseId for autovacuum but...  Perhaps
you could explain more what you have in mind?  And it is not like this
relies on the number of elements in PGPROC.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Simon Muller
Date:
Subject: Re: Allow COPY's 'text' format to output a header
Next
From: Michael Paquier
Date:
Subject: Re: REINDEX and shared catalogs