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: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2020-10-28T05:18:21Z
Lists: pgsql-bugs
On Thu, Oct 15, 2020 at 12:19:59PM -0300, Alvaro Herrera wrote:
> It just dawned on me that a way to fix this is to use a pg_shdepend
> entry to protect the tablespace from being dropped.

Haven't thought of that approach, good idea!  That would not be
backpatchable but that would be a solution that does not require
creating files where we don't need them.  Did you begin to look at
that?
--
Michael

Commits

  1. Prevent drop of tablespaces used by partitioned relations

  2. Don't create relfilenode for relations without storage