Re: Should new partitions inherit their tablespace from their parent?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Should new partitions inherit their tablespace from their parent?
Date: 2018-12-16 23:59:49
Message-ID: 20181216235949.GL5012@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2018-12-17 00:40:58 Re: gist microvacuum doesn't appear to care about hot standby?
Previous Message Tom Lane 2018-12-16 23:08:02 Re: select limit error in file_fdw