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: 2021-01-12T06:34:28Z
Lists: pgsql-bugs
On Mon, Jan 11, 2021 at 08:42:44PM -0300, Alvaro Herrera wrote: > Here's a proposed patch for this. Thanks! + /* + * If a tablespace is specified, removal of that tablespace is normally + * protected by the existence of a physical file; but for relations with + * no files, add a pg_shdepend entry to account for that. + */ + if (!create_storage && reltablespace != InvalidOid) On HEAD, could we consider using this dependency link even for relations that have physical files, and remove the physical file check? Could that make the dependency handling cleaner? -- Michael
Commits
-
Prevent drop of tablespaces used by partitioned relations
- ebfe2dbd6b62 14.0 landed
- c9b702552acc 12.6 landed
- c442b32c2e6d 11.11 landed
- 5b01a6f13ff7 13.2 landed
-
Don't create relfilenode for relations without storage
- 807ae415c546 12.0 cited