Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXoWG-0007yI-V1 for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Dec 2018 14:32:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXoWE-0001ae-Vb for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Dec 2018 14:32:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXoWE-0001Yu-Of for pgsql-hackers@lists.postgresql.org; Fri, 14 Dec 2018 14:32:46 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXoW7-0003On-17 for pgsql-hackers@postgresql.org; Fri, 14 Dec 2018 14:32:45 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 1F4235F7A7; Fri, 14 Dec 2018 09:32:37 -0500 (EST) Date: Fri, 14 Dec 2018 09:32:37 -0500 From: Stephen Frost To: Peter Eisentraut Cc: Sergei Kornilov , Michael Paquier , Andreas Karlsson , PostgreSQL mailing lists , Craig Ringer , Alvaro Herrera Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0 Message-ID: <20181214143236.GQ3415@tamriel.snowman.net> References: <20180126022813.GD2416@tamriel.snowman.net> <9523ad05-525c-598e-ad2d-061b5a94062c@proxel.se> <20180201062158.GD6398@paquier.xyz> <60052986-956b-4478-45ed-8bd119e9b9cf@2ndquadrant.com> <10797471544200851@myt3-964eae3a5b05.qloud-c.yandex.net> <93a3d2fb-43a0-cf14-e8d0-d2c3195c1e5b@2ndquadrant.com> <20486991544381729@iva5-d3020dc3459d.qloud-c.yandex.net> <52aae11b-bfa5-6ccc-3b98-774f4836ab42@2ndquadrant.com> <20181214001457.GP3415@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eYn9amKm/citCUWe" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --eYn9amKm/citCUWe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote: > On 14/12/2018 01:14, Stephen Frost wrote: > >>>> reindex table CONCURRENTLY test; > >> > >> By the way, does this syntax make sense? I haven't seen a discussion = on > >> this anywhere in the various threads. I keep thinking that > >> > >> reindex concurrently table test; > >> > >> would make more sense. How about in combination with (verbose)? > >=20 > > I don't think it's a mistake that we have 'create index concurrently' > > and it certainly would seem odd to me for 'create index' and 'reindex > > table' to be different. > >=20 > > Certainly, from my recollection of english, you'd say "I am going to > > reindex the table concurrently", you wouldn't say "I am going to > > reindex concurrently the table." > >=20 > > Based on at least a quick looking around, the actual grammar rule seems > > to match my recollection[1], adverbs should typically go AFTER the > > verb + object, and the adverb shouldn't ever be placed between the verb > > and the object. >=20 > So it would be grammatical to say >=20 > reindex table test concurrently Yes, though I'm not really a fan of it. > or in a pinch >=20 > reindex concurrently table test No, you can't put concurrently between reindex and table. > but I don't see anything grammatical about >=20 > reindex table concurrently test I disagree, this does look reasonable to me and it's certainly much better than 'reindex concurrently table' which looks clearly incorrect. > Where this gets really messy is stuff like this: >=20 > reindex (verbose) database concurrently postgres >=20 > Why would "concurrently" not be part of the options next to "verbose"? That wasn't what was asked and I don't think I see a problem with having concurrently be allowed in the parentheses. For comparison, it's not like "explain analyze select ..." or "explain buffers select" is terribly good grammatical form. If you wanted to try to get to a better form for the spelled out sentence, I would think: concurrently reindex table test would probably be the approach to use, though that's not what we use for 'create index' and it'd be rather out of character for us to start a command with an adverb, making it ultimately a poor choice overall. Going back to what we already have done and have in released versions, we have 'create unique index concurrently test ...' and that's at least reasonable (the adverb isn't showing up between the verb and the object, and the adjective is between the verb and the object) and is what I vote to go with, with the caveat that if we want to also allow it inside the parentheses, I'm fine with that. Thanks! Stephen --eYn9amKm/citCUWe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcE78EAAoJEO1sijiDR2RVlw0P/Rvukch2SKwTqsZIFNilj3d0 +jIvWDmKJW/NzZxeA97GWRMHl3NmhUJzA+GYOswZlj7C4onxNfCQxxUL0rw0gp2j hULlQVA07De5j6udiPOsLdYHLq5EZ6Mo2bqKB8RjeFLm3zcMHVZlOt57sK9gmwoZ 8no0vxAUEV4TRnvhrTkS6LbkJK1GsxjlXTmFv/M5PojWe8T0UQ4zFK3v4+6qcSw1 aVQkRDY8y0FwbQ5mBpch7XM7D9w9ls1G8UXb0foX+kGd1nuFFRAmPOKno6/qa/A+ 3huhSuCHscDdv0FG9Pt39ezvvad8ZfA/cEDwXsRnkNPtYfcMfsY9tSEW0YP+yD4b wqWGQzOuKvYNb372UN1n43rYs4quYzwdntalg3+aiLnUDoNl0AmBYEwmFO1Txb7j 2tRw06zo+sGCVTrBS9X1CC98V1eN+KTA7eFDjzud1e219Ok8SQCFeXgrTh6R5qAi 4qnOEQvl8agRDeOCswd7mp1uOA1BVpCorp96HZ5bo6cEg0m8KQTnUa4WatHvi7/R O3KC0/dYgwsvic0CYfY/2tdgtHJ4C3UJSg8JXZLDJlfTSJa1CVDaIPZXJq0e5KDX RCOY+rc3+XtPSJXXGeHDhyZVGyX/tGmIbl4KWQq+Mwc6WOrvlZNyb56k2Ye+Nh6q IbMXtyLzDJfk+CwwjI3f =a+3m -----END PGP SIGNATURE----- --eYn9amKm/citCUWe--