Re: BUG #16577: Segfault on altering a table located in a dropped tablespace

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2020-09-09T12:46:34Z
Lists: pgsql-bugs
On Wed, Sep 09, 2020 at 01:55:53AM +0200, Tomas Vondra wrote:
> Would it actually solve the issue? ISTM we'd still have to expect cases
> with partitioned tables without storage, so presumably we'd have to do
> something else ...

I am not sure what you mean here.  If we don't keep anymore references
to tablespace OIDs in pg_class for partitioned tables, meaning that we
don't leave anything dangling if the tablespace is dropped without any
files in its location, how could that be a problem?
--
Michael

Commits

  1. Prevent drop of tablespaces used by partitioned relations

  2. Don't create relfilenode for relations without storage