Re: pgsql: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURR

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org, pgsql-release@postgresql.org, Noah Misch <noah@leadboat.com>, pgsql-committers@lists.postgresql.org
Date: 2022-02-09T01:53:59Z
Lists: pgsql-hackers
Hi,

On 2022-02-09 02:25:09 +0100, Tomas Vondra wrote:
> AFAICS this only affects builds with CLOBBER_CACHE_ALWAYS, and anyone
> running such build in production clearly likes painful things anyway.

Yea, realistically nobody does that.


> But really, for the infinite loop to happen, building a relation descriptor
> has to invalidate a cache. And I haven't found a way to do that without the
> CLOBBER_CACHE_ALWAYS thing.

Phew.


> Also, all the November minor releases include this commit, and there were no
> reports about this (pretty obvious) issue. Buildfarm did not complain either
> (but an animal may be stuck for months and we would not know about it).

Ah, somehow I thought that wasn't yet in the last set of releases. Phew #2.

Greetings,

Andres Freund



Commits

  1. Fix back-patch of "Avoid race in RelationBuildDesc() ..."

  2. Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY.