pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16577: Segfault on altering a table located in a dropped tablespace
Date: Tue, 12 Jan 2021 12:08:04 -0300
Message-ID: <20210112150804.GA27528@alvherre.pgsql> (raw)
In-Reply-To: <X/1C9DlwMZBmPUw+@paquier.xyz>

On 2021-Jan-12, Michael Paquier wrote:

> +       /*
> +        * 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?

That would bloat the catalog with a lot of entries for stuff that can be
detected with the current method.  Did you notice that the code is
removing an "#ifdef NOT_USED" line to enable existing code?  Well, when
I wrote this code in 2005 (59d1b3d99e69) it was doing things as you
suggest, but in the end we decided that it wasn't necessary so it was
taken out.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"Someone said that it is at least an order of magnitude more work to do
production software than a prototype. I think he is wrong by at least
an order of magnitude."                              (Brian Kernighan)





view thread (22+ messages)  latest in thread

Message-ID: <20210112150804.GA27528@alvherre.pgsql>
Permalink:  ../20210112150804.GA27528@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210112150804.GA27528@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, michael@paquier.xyz, tomas.vondra@2ndquadrant.com, tgl@sss.pgh.pa.us, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16577: Segfault on altering a table located in a dropped tablespace
  In-Reply-To: <20210112150804.GA27528@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox