Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5m5i-0007Uk-Q4 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2017 04:40:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d5m5i-0003Ij-93 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 May 2017 04:40:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d5m4C-0000XC-IP for pgsql-hackers@postgresql.org; Wed, 03 May 2017 04:39:08 +0000 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d5m44-0004wM-Mh for pgsql-hackers@postgresql.org; Wed, 03 May 2017 04:39:06 +0000 Received: by mail-wm0-x234.google.com with SMTP id m123so42711292wma.0 for ; Tue, 02 May 2017 21:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=3wvnYkSQXrtQWZ6WSgqb9/AsKkf0BvedTm6/Hf/8HS4=; b=lhMP3L/AZ3YRZXijFAUAWUz3yi3WS5lWC4/nL9LjCPAhtxM7Qa0euLhc+0gXq+n7bM Vm9oW/bH90D5oX3TQr1PiaqOiI6wSd01DFH3jZ00Se9bOP6pPazE4V77CI9A7dB5KhW2 kArGM4vyK051B52EeNdGkKDUKVub6L45sOSa5D0uerbeYjTXUw8GOGGZ5TJx7Qy6b6l0 NWq1soPxSxFluAIkJNep1Y4rW9lJN3tszbIWe9yWVJ11JuZszjQuPjFBRVFIoH+Orub4 mBnF5z7OOBwTO25PiQfoSejeLII4xwkJSSaopiAgABASz6X4eoWQ/c+yScxxBVUzDXw8 6o6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=3wvnYkSQXrtQWZ6WSgqb9/AsKkf0BvedTm6/Hf/8HS4=; b=XMXzxaro29NWfLWSTWB3/ImmOHbKCJUTO9USMQPzx5n72HC8GSA5Apc+/5VHlb0ycv a0fvuOh0br1fPN5mVhrkcj7ZUKnBKZ4/k7rjs74uuTbedZc/Aj9VD5HOXQ96Fp3Hnnyt Xvn74YFeP5PMvccKc6h8ogSMSrQYqCehG4LQ/soqPZSjHRnsE8zTcpU+5MnCDJwqb8tf NlDtLsr6z5fYVCdmJRli+oNgrmxTGiuzJgME2NktbTI8cqXuRmA+CGtGEseYb5CyGnpf Jy5BIR6gVF7Sqak3y4iTtjh1RXmamjUux1YGNXitnFbl40p4f5q6QM4UvrIHk0AeBpYI WQGA== X-Gm-Message-State: AN3rC/6lPiqm0OJpoQ3qbx9nMmSb1W55zQCbLFKEHN8FEqlylSzX/Fv2 n1XC0gJNqgTqKZI/80qTvn+7TcY6z9WjyJHoY8F5WIA3MRAJv8t2+EJzmDh7WXy666y6ifKwMLl DAk988Dg/W2+42UO2nTXkHRJYzA9QGfCUzKlOHtoUbc/aqas7gPiNVoRe9aCH17LQQPiGy1VR X-Received: by 10.28.15.75 with SMTP id 72mr8609wmp.39.1493786338754; Tue, 02 May 2017 21:38:58 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id h199sm3086804wme.4.2017.05.02.21.38.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 21:38:57 -0700 (PDT) Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling) To: Robert Haas References: <27478.1493727233@sss.pgh.pa.us> <0afdeda8-d8a1-56d8-f637-7f110c2ca443@2ndquadrant.com> Cc: Tom Lane , Michael Paquier , Peter Eisentraut , PostgreSQL-development From: Petr Jelinek Message-ID: <647cb9ea-4b9b-75d3-df12-c52ddfd512a8@2ndquadrant.com> Date: Wed, 3 May 2017 06:38:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 02/05/17 22:40, Robert Haas wrote: > On Tue, May 2, 2017 at 3:02 PM, Petr Jelinek > 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