Re: Should new partitions inherit their tablespace from their parent? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Should new partitions inherit their tablespace from their parent?
Date
Msg-id 20181216235949.GL5012@paquier.xyz
Whole thread Raw
In response to Re: Should new partitions inherit their tablespace from their parent?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Should new partitions inherit their tablespace from their parent?
List pgsql-hackers
On Sun, Dec 16, 2018 at 07:07:35PM -0300, Alvaro Herrera wrote:
> I'll self-review this again tomorrow, 'cause I now have to run.

> -        if (!is_partition)
> -            relation = heap_openrv(parent, ShareUpdateExclusiveLock);
> -        else
> -            relation = heap_openrv(parent, AccessExclusiveLock);
> +        /* caller already got lock */
> +        relation = heap_open(parent, NoLock);

Okay, I think that you should add an assertion on
CheckRelationLockedByMe() as MergeAttributes()'s only caller is
DefineRelation().  Better safe than sorry later.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: select limit error in file_fdw
Next
From: Alexander Korotkov
Date:
Subject: Re: gist microvacuum doesn't appear to care about hot standby?