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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16577: Segfault on altering a table located in a dropped tablespace
Date: 2020-10-28 13:40:45
Message-ID: 20201028134045.GA6709@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2020-Oct-28, Michael Paquier wrote:

> 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?

I haven't started on this one yet, but I intend to do so shortly.

Strictly speaking, we can still introduce a new category of pg_shdepend
entries in back branches; it won't break anything that works today. And
while it won't fix the problem on existing partitioned tables, it is
possible to have users run a query on each database to create any rows
needed. The only *actual* incompatibility is that once you upgrade and
create the rows, an older server of the same major may misbehave when
does rows are present. But do we ever see users going back to previous
minors? I think this isn't really a terrible problem in practice. And
even if it is, users can work around it by deleting the offending rows.

What do you think?

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-10-28 13:59:24 Re: BUG #16577: Segfault on altering a table located in a dropped tablespace
Previous Message Sandeep Thakkar 2020-10-28 07:09:14 Re: Checksum verification fails with StackBuilder when downloading pgAgent