Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids(). - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().
Date
Msg-id 20180306005753.GC1878@paquier.xyz
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Mon, Mar 05, 2018 at 04:34:09PM -0800, Andres Freund wrote:
> Scratch that, we should be going down the
>     /* If caller supplied OID, there's nothing we need do here. */
>     if (OidIsValid(vrel->oid))
>     {
>         oldcontext = MemoryContextSwitchTo(vac_context);
>         vacrels = lappend(vacrels, vrel);
>         MemoryContextSwitchTo(oldcontext);
>     }
> branch in expand_vacuum_rel() for autovacuum, so this shouldn't
> matter. Sorry for the noise

Yes, I don't see a problem.  However I can understand that it is easy to
be confused on those code paths if you are not used to them and this
area has changed quite a bit the last years.  Perhaps we could add an
Assert(IsAutoVacuumWorkerProcess()) to reduce the confusion?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Change RangeVarGetRelidExtended() to take flags argument?
Next
From: Andres Freund
Date:
Subject: Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().