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

2022-02-09 Thread Tomas Vondra
On 2/9/22 06:41, Noah Misch wrote: The explanation was more boring than that. v13 and earlier have an additional InvalidateSystemCaches() call site, which I neglected to update. Here's the fix I intend to push. I tried this patch on 10 and 13, and it seems to fix the issue. So +1. regards

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

2022-02-09 Thread Tom Lane
Michael Paquier writes: > On Tue, Feb 08, 2022 at 05:43:34PM -0800, Andres Freund wrote: >> It's stamped, not tagged, so we could send out new tarballs. Or we could skip >> a release number. IIRC we had to do something along those lines before. > It does not matter now, but the release is stamped

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

2022-02-09 Thread Noah Misch
On Tue, Feb 08, 2022 at 06:04:03PM -0800, Noah Misch wrote: > On Tue, Feb 08, 2022 at 04:43:47PM -0800, Andres Freund wrote: > > On 2022-02-08 22:13:01 +0100, Tomas Vondra wrote: > > > On 10/24/21 03:40, Noah Misch wrote: > > > > Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY

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

2022-02-09 Thread Michael Paquier
On Tue, Feb 08, 2022 at 05:43:34PM -0800, Andres Freund wrote: > It's stamped, not tagged, so we could send out new tarballs. Or we could skip > a release number. IIRC we had to do something along those lines before. It does not matter now, but the release is stamped and tagged. > What do you mea

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

2022-02-09 Thread Noah Misch
On Tue, Feb 08, 2022 at 04:43:47PM -0800, Andres Freund wrote: > On 2022-02-08 22:13:01 +0100, Tomas Vondra wrote: > > On 10/24/21 03:40, Noah Misch wrote: > > > Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. > > > > > > CIC and REINDEX CONCURRENTLY assume backends see thei

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

2022-02-09 Thread Andres Freund
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 re

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

2022-02-09 Thread Andres Freund
Hi, On 2022-02-09 10:23:06 +0900, Michael Paquier wrote: > On Tue, Feb 08, 2022 at 04:43:47PM -0800, Andres Freund wrote: > > Ugh. Do we need to do something about WRT the next set of minor > > releases? > > The set of minor releases of this week has already been stamped, so > that's too late :/

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

2022-02-09 Thread Tomas Vondra
On 2/9/22 01:43, Andres Freund wrote: Hi, On 2022-02-08 22:13:01 +0100, Tomas Vondra wrote: On 10/24/21 03:40, Noah Misch wrote: Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. CIC and REINDEX CONCURRENTLY assume backends see their catalog changes no later than each

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

2022-02-09 Thread Michael Paquier
On Tue, Feb 08, 2022 at 04:43:47PM -0800, Andres Freund wrote: > Ugh. Do we need to do something about WRT the next set of minor > releases? The set of minor releases of this week has already been stamped, so that's too late :/ > Is there a a chance of this occuring in "real" workloads? Ugh++.

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

2022-02-09 Thread Andres Freund
Hi, On 2022-02-08 22:13:01 +0100, Tomas Vondra wrote: > On 10/24/21 03:40, Noah Misch wrote: > > Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. > > > > CIC and REINDEX CONCURRENTLY assume backends see their catalog changes > > no later than each backend's next transaction