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

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>, Tom Lane <tgl@sss.pgh.pa.us>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2021-01-11T23:42:44Z
Lists: pgsql-bugs

Attachments

On 2020-Oct-15, 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.

Here's a proposed patch for this.

-- 
Álvaro Herrera

Commits

  1. Prevent drop of tablespaces used by partitioned relations

  2. Don't create relfilenode for relations without storage