Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY
Date
Msg-id 8445.1560126790@sss.pgh.pa.us
Whole thread Raw
In response to Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY  (Andres Freund <andres@anarazel.de>)
Responses Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY  ("Goel, Dhruv" <goeldhru@amazon.com>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On June 9, 2019 8:36:37 AM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think you are mistaken that doing transactional updates in pg_index
>> is OK.  If memory serves, we rely on xmin of the pg_index row for
>> purposes such as detecting whether a concurrently-created index is safe
>> to use yet.

> We could replace that with storing a 64 xid in a normal column nowadays.

Perhaps, but that's a nontrivial change that'd be prerequisite to
doing what's suggested in this thread.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Custom table AMs need to include heapam.h because of BulkInsertState
Next
From: "Zhang, Jie"
Date:
Subject: [PATCH] memory leak in ecpglib