From: Petr Jelinek <petr.jelinek@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)
Date: Wed, 3 May 2017 06:38:57 +0200
Message-ID: <647cb9ea-4b9b-75d3-df12-c52ddfd512a8@2ndquadrant.com> (raw)
In-Reply-To: <CA+TgmoZbPy9ufRQE46HGA-2u3Cj9Z_vHtkvtpW9N2pW4LmGQ_Q@mail.gmail.com>
References: <CA+TgmoZmkbpAWRzVKDVcHnTBkYjJEFS8=09RL-G3zgdozCLFHQ@mail.gmail.com>
<27478.1493727233@sss.pgh.pa.us>
<cacf7538-5658-a93f-c03a-83d309ed1d9a@2ndquadrant.com>
<CA+TgmoYe8_FZ9oNTxL-q42kUXGKCDrrG512qbyKAQw9ROBvQ9g@mail.gmail.com>
<0afdeda8-d8a1-56d8-f637-7f110c2ca443@2ndquadrant.com>
<CA+TgmoZbPy9ufRQE46HGA-2u3Cj9Z_vHtkvtpW9N2pW4LmGQ_Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 02/05/17 22:40, Robert Haas wrote:
> On Tue, May 2, 2017 at 3:02 PM, Petr Jelinek
> <petr.jelinek@2ndquadrant.com> wrote:
>> That sounds okay. I know PeterE didn't like the lower case and
>> underscore separated words for options in the original patch, so I'd
>> like to hear his opinion on this. I am not sure how much advantage is
>> there in removing the '=' in between the key and value. That's the main
>> difference between generic options and definitions (well and definitions
>> can have 2 words for key, but that's something I have added anyway), I
>> don't really understand why we have both and use one for some commends
>> and the other for others btw.
>
> I don't care all *that* much about the equals sign, although I think
> it's marginally more elegant without it, and VACUUM, EXPLAIN, and COPY
> all do it that way. But I think allowing two-word names is just a
> pile of parser nastiness that we'd be far better off without. If you
> use the same syntax as VACUUM, EXPLAIN, and COPY, all options are a
> single identifier.
Ok, Let me be clear, I actually happen to agree with your proposal. The
reason I am moaning is that I always seem to find myself doing tons of
mechanical work to rewrite some cosmetic aspect of some patch based on
which committer is paying attention in a specific week. So while I am
for doing exactly what you proposed, I'd like to see couple of +1s first
(Peter?) since I don't want to rewrite it to something different again
and it's also long past freeze.
To repeat the proposal:
- change the WITH (...) clauses in subscription/publication commands to:
(create_slot true/false, connect true/false, slot_name 'something',
copy_data true/false, etc)
- change the NOREFRESH to NO REFRESH in ALTER SUBSCRIPTION name SET
PUBLICATION (btw I originally had SKIP REFRESH there but changed it to
NOREFRESH for consistency with the other NO* stuff, wonder if SKIP would
sound more english).
- change the (publish insert/nopublish insert/publish update/nopublish
update), etc options to (publish 'update,insert').
And one question, if we are not using the definitions (key = value)
should we keep the WITH keyword in the syntax, would it be confusing?
> If it's got to be multiple words, they can be
> separated by underscores. But with what you've got right now, it's
> sometimes one identifier even when it's two words, and sometimes two
> identifiers.
>
The main inconsistency is the synchronous_commit which is that way to
make it clear it's same as the GUC it changes, but looks like that was a
mistake.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: petr.jelinek@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, michael.paquier@gmail.com, peter.eisentraut@2ndquadrant.com
Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)
In-Reply-To: <647cb9ea-4b9b-75d3-df12-c52ddfd512a8@2ndquadrant.com>
* 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