agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Williams <valenceshell@protonmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pg_dump compatibility level / use create view instead of create table/rule
Date: Sat, 26 Oct 2019 15:03:18 -0400
Message-ID: <4297.1572116598@sss.pgh.pa.us> (raw)
In-Reply-To: <1095.1570720814@sss.pgh.pa.us>
References: <NFqxoEi7-8Rw9OW0f-GwHcjvS2I4YQXov4g9OoWv3i7lVOZdLWkAWl9jQQqwEaUq6WV0vdobromhW82e8y5I0_59yZTXcZnXsrmFuldlmZc=@protonmail.com>
<30565.1570597261@sss.pgh.pa.us>
<KAJrgQ84Kmh-_zwP7MtMPVbx32uE78hQaiAhxpdylcsiISMqRSL3UUGiJQZlbpkT4L5R6BMj-cCpBqUXK1R34HgUSq1Y3I8QjMpLBACQKDo=@protonmail.com>
<MzQZmmoeor-gQY3YlRIVMCXpdWHT8oohKzczWGjPrm4tvY8o8S74QYm_kOcKMztQvME5vhi6MQy8eVZYxtRPAE9uSe30gjTdr2MOYy-L6wE=@protonmail.com>
<18dWrRFcmR7qHhsVTvYfGuRT8Tx5LijYQ72SeMWaya_0FiBkS5BFiYTa47R5WVTlADzXAqI85sZgkKPFVdJP2UWsUwJty3KuZ4eZvlVXO-I=@protonmail.com>
<17815.1570661198@sss.pgh.pa.us>
<-pa2tdKbasT5nWrYgCtvhKtMDyPIboaoG53ZSPb0MfCvzMUaVJDgQddN1ve-XLllFBKmQ8kGJ7InqBcYwq5CJY2DnLI4HVWTHyYx8wwBTtM=@protonmail.com>
<1095.1570720814@sss.pgh.pa.us>
I wrote:
> Alex Williams <valenceshell@protonmail.com> writes:
>> [ gripes about pg_dump printing REPLICA IDENTITY NOTHING for a view ]
> This is fixed in v10 and up thanks to d8c05aff5. I was hesitant to
> back-patch that at the time, but now that it's survived in the field
> for a couple years, I think a good case could be made for doing so.
> After a bit of looking around, the main argument I can find against
> it is that emitting 'CREATE OR REPLACE VIEW' in a dropStmt will
> break pg_restore versions preceding this commit:
> Author: Tom Lane <tgl@sss.pgh.pa.us>
> Branch: master Release: REL_10_BR [ac888986f] 2016-11-17 14:59:13 -0500
> Branch: REL9_6_STABLE Release: REL9_6_2 [0eaa5118a] 2016-11-17 14:59:19 -0500
> Branch: REL9_5_STABLE Release: REL9_5_6 [a7864037d] 2016-11-17 14:59:23 -0500
> Branch: REL9_4_STABLE Release: REL9_4_11 [e69b532be] 2016-11-17 14:59:26 -0500
> Improve pg_dump/pg_restore --create --if-exists logic.
After further digging, I remembered that we bumped the archive file
version number in 3d2aed664 et al. to fix CVE-2018-1058. So current
versions of pg_dump already emit archive files that will be rejected
by pg_restore versions preceding the above fix, and so there should be
no downside to emitting data that depends on it.
I'll go see about backpatching d8c05aff5.
regards, tom lane
view thread (12+ messages) latest in thread
Message-ID: <4297.1572116598@sss.pgh.pa.us>
Permalink: ../4297.1572116598@sss.pgh.pa.us/
Also on: postgresql.org/message-id/4297.1572116598@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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, valenceshell@protonmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_dump compatibility level / use create view instead of create table/rule
In-Reply-To: <4297.1572116598@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox