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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-12-10T13:56:47Z
Lists: pgsql-hackers
On Mon, Dec 10, 2018 at 11:37:16PM +1300, David Rowley wrote:
> Likely it would be nice if we had a macro to determine if the relkind
> should have storage or not, and then just Assert() we get one of those
> into the function.

The other thread can deal about that matter I guess.

> For now, I've just changed the Assert to only pass when we get a
> partitioned table or partitioned index. I've left a comment to mention
> that other types may need to be added later. Assert failures should
> remind us to check that any newly added callers work correctly.
> 
> Updated patch attached.

Cool, thanks for updating the assertion.  At quick glance the patch
seems fine to me.  Let's keep ATExecSetTableSpaceNoStorage as routine
name as you suggest then.
--
Michael

Commits

  1. Fix tablespace handling for partitioned tables