Re: CREATE INDEX CONCURRENTLY on partitioned index - Mailing list pgsql-hackers

From Alexander Pyhalov
Subject Re: CREATE INDEX CONCURRENTLY on partitioned index
Date
Msg-id efd4febd4ed08e579318de59e16e087c@postgrespro.ru
Whole thread Raw
In response to Re: CREATE INDEX CONCURRENTLY on partitioned index  (Alexander Pyhalov <a.pyhalov@postgrespro.ru>)
Responses Re: CREATE INDEX CONCURRENTLY on partitioned index
List pgsql-hackers
Hi.

I've rebased patch on master and it'seems to me there's one more issue -

when we call DefineIndexConcurrentInternal() in partitioned case, it 
waits for transactions, locking tableId, not tabrelid - heaprelid 
LockRelId is constructed for parent index relation, not for child index 
relation.

Attaching fixed version.

Also I'm not sure what to do with locking of child relations. If we 
don't do anything, you can drop one of the partitioned table childs 
while CIC is in progress, and get error

ERROR:  cache lookup failed for index 16399

If you try to lock all child tables in CIC session, you'll get 
deadlocks.

-- 
Best regards,
Alexander Pyhalov,
Postgres Professional
Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Functions to return random numbers in a given range
Next
From: torikoshia
Date:
Subject: Re: RFC: Logging plan of the running query