pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: ALTER TABLE lock downgrades have broken pg_upgrade
Date: Tue, 03 May 2016 13:58:36 -0400
Message-ID: <19748.1462298316@sss.pgh.pa.us> (raw)
In-Reply-To: <20160503174457.p6exbeehmfmgml3w@alap3.anarazel.de>
References: <8110.1462291671@sss.pgh.pa.us>
	<20160503174457.p6exbeehmfmgml3w@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> writes:
> On 2016-05-03 12:07:51 -0400, Tom Lane wrote:
>> I think possibly the easiest fix for this is to have pg_upgrade,
>> instead of RESETting a nonexistent option, RESET something that's
>> still considered to require AccessExclusiveLock.  "user_catalog_table"
>> would work, looks like; though I'd want to annotate its entry in
>> reloptions.c to warn people away from downgrading its lock level.

> Alternatively we could just add a function for adding a toast table -
> that seems less hacky and less likely to be broken in the future.

We used to have an explicit "ALTER TABLE CREATE TOAST TABLE", IIRC,
but we got rid of it.  In any case, forcible creation is not what
we're after here, we just want to create it if needs_toast_table()
thinks we need one.  I'm fine with it being a hack, as long as we
have test coverage so we notice when somebody breaks the hack.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (27+ messages)  latest in thread

Message-ID: <19748.1462298316@sss.pgh.pa.us>
Permalink:  ../19748.1462298316@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19748.1462298316@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de
  Subject: Re: ALTER TABLE lock downgrades have broken pg_upgrade
  In-Reply-To: <19748.1462298316@sss.pgh.pa.us>
  References: <8110.1462291671@sss.pgh.pa.us> <20160503174457.p6exbeehmfmgml3w@alap3.anarazel.de> <19748.1462298316@sss.pgh.pa.us>

* 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