Re: pgsql: autovacuum: handle analyze for partitioned tables

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables
Date: 2021-04-21 22:40:19
Message-ID: 20210421224019.GA12807@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2021-Apr-08, Tom Lane wrote:

> BTW, another thing that looks like a race condition is the
> extract_autovac_opts() call that is done a little bit earlier,
> also without lock. I think this is actually safe, but it's ONLY
> safe because we resisted the calls by certain people to add a
> toast table to pg_class. Otherwise, fetching reloptions could
> have involved a toast pointer dereference, and it would then be
> racy whether the toasted data was still there. As-is, even if
> the pg_class row we're looking at has been deleted, we can safely
> disassemble its reloptions. I think this matter is deserving
> of a comment at least.

True. I added a comment there.

Thanks,

--
Álvaro Herrera Valdivia, Chile
"I am amazed at [the pgsql-sql] mailing list for the wonderful support, and
lack of hesitasion in answering a lost soul's question, I just wished the rest
of the mailing list could be like this." (Fotis)
(http://archives.postgresql.org/pgsql-sql/2006-06/msg00265.php)

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-04-21 23:06:49 Re: pgsql: autovacuum: handle analyze for partitioned tables
Previous Message Alvaro Herrera 2021-04-21 22:39:23 pgsql: Add comment about extract_autovac_opts not holding lock

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-04-21 23:06:49 Re: pgsql: autovacuum: handle analyze for partitioned tables
Previous Message Bruce Momjian 2021-04-21 22:14:13 Re: proposal for PostgreSQL program