Re: pg_upgrade ?deficiency

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>, "Hilbert, Sebastian" <Sebastian(dot)Hilbert(at)gmx(dot)net>
Subject: Re: pg_upgrade ?deficiency
Date: 2013-11-20 13:04:23
Message-ID: 20131120130423.GN22683@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, Nov 19, 2013 at 11:22:47AM +0100, Karsten Hilbert wrote:
> ERROR: transaction is read-only
>
> Now, this is quite understandable since one of the databases
> is set to
>
> ALTER DATABASE ... SET DEFAULT_TRANSACTION_READ_ONLY TO ON;
>
> However, since the above setting is something which can
> be expected every so often in any odd PostgreSQL cluster
> (and not some weird coincidence no one really knows how
> they got into in the first place) I would think pg_upgrade
> really should be able to handle.
>
> Technically that's pretty easy - make sure transactions are
> set to readwrite for the pg_upgrade run by any number of
> means:
>
> - ALTER DATABASE before/after pg_upgrade
> - ALTER USER running the pg_upgrade
> - SET TRANSACTION READ WRITE at the appropriate times
> - ...
>
> Or at least this limitation of pg_upgrade (requiring
> DB write access) should get a mention in the docs and/or
> man page.
>
> What is the informed opinion on this ?

I think pg_upgrade did the right thing here by throwing an error. There
is no clean way to handle these cases without possibly causing more
problems.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2013-11-20 13:21:15 Re: pg_upgrade ?deficiency
Previous Message Bruce Momjian 2013-11-20 12:59:27 Re: Postgres as In-Memory Database?

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-11-20 13:08:29 Re: Easily reading debug_print_plan
Previous Message Robert Haas 2013-11-20 12:52:58 Re: additional json functionality