Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-15 Thread Fujii Masao
On Sun, May 10, 2015 at 2:23 AM, Sawada Masahiko wrote: > On Sat, May 9, 2015 at 4:26 AM, Fabrízio de Royes Mello > wrote: >> >> >> On Fri, May 8, 2015 at 4:23 PM, Fabrízio de Royes Mello >> wrote: >>> >>> >>> On Thu, May 7, 2015 at 7:55 PM, Sawada Masahiko >>> wrote: >>> > >>> > On 5/7/15, Saw

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-15 Thread Fujii Masao
On Thu, May 14, 2015 at 4:30 PM, Sawada Masahiko wrote: > On Thu, May 14, 2015 at 9:58 AM, Robert Haas wrote: >> On Wed, May 13, 2015 at 8:25 PM, Sawada Masahiko >> wrote: >>> The v15 patch emits a line for each table when reindexing multiple >>> tables, and emits a line for each index when rei

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-14 Thread Sawada Masahiko
On Thu, May 14, 2015 at 9:58 AM, Robert Haas wrote: > On Wed, May 13, 2015 at 8:25 PM, Sawada Masahiko > wrote: >> The v15 patch emits a line for each table when reindexing multiple >> tables, and emits a line for each index when reindexing single table. >> But v14 patch emits a line for each in

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Robert Haas
On Wed, May 13, 2015 at 8:25 PM, Sawada Masahiko wrote: > The v15 patch emits a line for each table when reindexing multiple > tables, and emits a line for each index when reindexing single table. > But v14 patch emits a line for each index, regardless of reindex target. > Should I change back to

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Fabrízio de Royes Mello
On Wed, May 13, 2015 at 2:49 PM, Sawada Masahiko wrote: > > On Thu, May 14, 2015 at 12:28 AM, Robert Haas wrote: > > On Thu, May 7, 2015 at 6:55 PM, Sawada Masahiko wrote: > >> Sorry, I forgot attach files. > > > > Review comments: > > > > - Customarily we use int, rather than uint8, for flags v

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Sawada Masahiko
On Thu, May 14, 2015 at 4:53 AM, Robert Haas wrote: > On Wed, May 13, 2015 at 2:10 PM, Alvaro Herrera > wrote: >> Uh, are we really using INFO to log this? I thought that was a >> discouraged level to use anymore. Why not NOTICE? > > Well, as Masahiko-san points out, VACUUM uses INFO. I can't

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, May 13, 2015 at 2:10 PM, Alvaro Herrera > wrote: > > Uh, are we really using INFO to log this? I thought that was a > > discouraged level to use anymore. Why not NOTICE? > > Well, as Masahiko-san points out, VACUUM uses INFO. I can't see any > good reason to make t

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Robert Haas
On Wed, May 13, 2015 at 2:10 PM, Alvaro Herrera wrote: > Uh, are we really using INFO to log this? I thought that was a > discouraged level to use anymore. Why not NOTICE? Well, as Masahiko-san points out, VACUUM uses INFO. I can't see any good reason to make this different. > Also, when mult

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Sawada Masahiko
On Thu, May 14, 2015 at 3:10 AM, Alvaro Herrera wrote: > Uh, are we really using INFO to log this? I thought that was a > discouraged level to use anymore. Why not NOTICE? > I think it should be INFO level because it is a information of REINDEX command,such as progress of itself, CPU usage and

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Alvaro Herrera
Uh, are we really using INFO to log this? I thought that was a discouraged level to use anymore. Why not NOTICE? Also, when multiple tables are reindexed, do we emit lines for each index, or only for each table? If we're going to emit a line for each index in the single-table mode, it seems mor

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Sawada Masahiko
On Thu, May 14, 2015 at 12:28 AM, Robert Haas wrote: > On Thu, May 7, 2015 at 6:55 PM, Sawada Masahiko wrote: >> Sorry, I forgot attach files. > > Review comments: > > - Customarily we use int, rather than uint8, for flags variables. I > think we should do that here also. > > - reindex_index() e

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-13 Thread Robert Haas
On Thu, May 7, 2015 at 6:55 PM, Sawada Masahiko wrote: > Sorry, I forgot attach files. Review comments: - Customarily we use int, rather than uint8, for flags variables. I think we should do that here also. - reindex_index() emits a log message either way, but at DEBUG2 level without VERBOSE a

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-09 Thread Sawada Masahiko
On Sun, May 10, 2015 at 2:23 AM, Sawada Masahiko wrote: > On Sat, May 9, 2015 at 4:26 AM, Fabrízio de Royes Mello > wrote: >> >> >> On Fri, May 8, 2015 at 4:23 PM, Fabrízio de Royes Mello >> wrote: >>> >>> >>> On Thu, May 7, 2015 at 7:55 PM, Sawada Masahiko >>> wrote: >>> > >>> > On 5/7/15, Saw

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-09 Thread Sawada Masahiko
On Sat, May 9, 2015 at 4:26 AM, Fabrízio de Royes Mello wrote: > > > On Fri, May 8, 2015 at 4:23 PM, Fabrízio de Royes Mello > wrote: >> >> >> On Thu, May 7, 2015 at 7:55 PM, Sawada Masahiko >> wrote: >> > >> > On 5/7/15, Sawada Masahiko wrote: >> > > On Wed, May 6, 2015 at 5:42 AM, Robert Haas

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-08 Thread Fabrízio de Royes Mello
On Fri, May 8, 2015 at 4:23 PM, Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > > On Thu, May 7, 2015 at 7:55 PM, Sawada Masahiko wrote: > > > > On 5/7/15, Sawada Masahiko wrote: > > > On Wed, May 6, 2015 at 5:42 AM, Robert Haas > > > wrote: > > >> On Tue, May 5, 2015 at 11:10 AM,

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-08 Thread Fabrízio de Royes Mello
On Thu, May 7, 2015 at 7:55 PM, Sawada Masahiko wrote: > > On 5/7/15, Sawada Masahiko wrote: > > On Wed, May 6, 2015 at 5:42 AM, Robert Haas > > wrote: > >> On Tue, May 5, 2015 at 11:10 AM, Sawada Masahiko > > wrote: > >>> On Fri, May 1, 2015 at 9:04 PM, Robert Haas > > wrote: > On Thu, A

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-07 Thread Sawada Masahiko
On 5/7/15, Sawada Masahiko wrote: > On Wed, May 6, 2015 at 5:42 AM, Robert Haas > wrote: >> On Tue, May 5, 2015 at 11:10 AM, Sawada Masahiko > wrote: >>> On Fri, May 1, 2015 at 9:04 PM, Robert Haas > wrote: On Thu, Apr 30, 2015 at 11:05 PM, Sawada Masahiko > wrote: > VACUUM has b

[HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-07 Thread Sawada Masahiko
On Wed, May 6, 2015 at 5:42 AM, Robert Haas > wrote: > On Tue, May 5, 2015 at 11:10 AM, Sawada Masahiko > wrote: >> On Fri, May 1, 2015 at 9:04 PM, Robert Haas > wrote: >>> On Thu, Apr 30, 2015 at 11:05 PM, Sawada Masahiko > wrote: VACUUM has both syntax: with parentheses and without parenthes

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-05 Thread Robert Haas
On Tue, May 5, 2015 at 11:10 AM, Sawada Masahiko wrote: > On Fri, May 1, 2015 at 9:04 PM, Robert Haas wrote: >> On Thu, Apr 30, 2015 at 11:05 PM, Sawada Masahiko >> wrote: >>> VACUUM has both syntax: with parentheses and without parentheses. >>> I think we should have both syntax for REINDEX li

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-05 Thread Sawada Masahiko
On Fri, May 1, 2015 at 9:04 PM, Robert Haas wrote: > On Thu, Apr 30, 2015 at 11:05 PM, Sawada Masahiko > wrote: >> VACUUM has both syntax: with parentheses and without parentheses. >> I think we should have both syntax for REINDEX like VACUUM does >> because it would be pain to put parentheses w

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-05-01 Thread Robert Haas
On Thu, Apr 30, 2015 at 11:05 PM, Sawada Masahiko wrote: > VACUUM has both syntax: with parentheses and without parentheses. > I think we should have both syntax for REINDEX like VACUUM does > because it would be pain to put parentheses whenever we want to do > REINDEX. > Are the parentheses optio

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-30 Thread Sawada Masahiko
On Fri, May 1, 2015 at 1:38 AM, Robert Haas wrote: > On Thu, Apr 30, 2015 at 9:15 AM, Sawada Masahiko > wrote: >> On Thu, Apr 30, 2015 at 8:39 PM, Robert Haas wrote: >>> On Thu, Apr 30, 2015 at 6:37 AM, Sawada Masahiko >>> wrote: Attached v10 patch is latest version patch. The synta

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-30 Thread Robert Haas
On Thu, Apr 30, 2015 at 9:15 AM, Sawada Masahiko wrote: > On Thu, Apr 30, 2015 at 8:39 PM, Robert Haas wrote: >> On Thu, Apr 30, 2015 at 6:37 AM, Sawada Masahiko >> wrote: >>> Attached v10 patch is latest version patch. >>> The syntax is, >>> REINDEX { INDEX | ... } name [ WITH ] [ VERBOSE ] >>

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-30 Thread Fabrízio de Royes Mello
On Thu, Apr 30, 2015 at 10:15 AM, Sawada Masahiko wrote: > > On Thu, Apr 30, 2015 at 8:39 PM, Robert Haas wrote: > > On Thu, Apr 30, 2015 at 6:37 AM, Sawada Masahiko wrote: > >> Attached v10 patch is latest version patch. > >> The syntax is, > >> REINDEX { INDEX | ... } name [ WITH ] [ VERBOSE ]

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-30 Thread Sawada Masahiko
On Thu, Apr 30, 2015 at 8:39 PM, Robert Haas wrote: > On Thu, Apr 30, 2015 at 6:37 AM, Sawada Masahiko > wrote: >> Attached v10 patch is latest version patch. >> The syntax is, >> REINDEX { INDEX | ... } name [ WITH ] [ VERBOSE ] >> >> That is, WITH clause is optional. > > I thought we agreed on

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-30 Thread Robert Haas
On Thu, Apr 30, 2015 at 6:37 AM, Sawada Masahiko wrote: > Attached v10 patch is latest version patch. > The syntax is, > REINDEX { INDEX | ... } name [ WITH ] [ VERBOSE ] > > That is, WITH clause is optional. I thought we agreed on moving this earlier in the command: http://www.postgresql.org/me

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-30 Thread Sawada Masahiko
On Fri, Apr 10, 2015 at 2:52 AM, Sawada Masahiko wrote: > On Thu, Apr 9, 2015 at 1:14 PM, Fujii Masao wrote: >> On Wed, Apr 8, 2015 at 10:53 PM, Sawada Masahiko >> wrote: >>> On Wed, Apr 8, 2015 at 1:09 PM, Fujii Masao wrote: On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko wrote: >

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-09 Thread Sawada Masahiko
On Thu, Apr 9, 2015 at 1:14 PM, Fujii Masao wrote: > On Wed, Apr 8, 2015 at 10:53 PM, Sawada Masahiko > wrote: >> On Wed, Apr 8, 2015 at 1:09 PM, Fujii Masao wrote: >>> On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko >>> wrote: On Wed, Apr 8, 2015 at 1:11 AM, Fabrízio de Royes Mello

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-08 Thread Fujii Masao
On Wed, Apr 8, 2015 at 10:53 PM, Sawada Masahiko wrote: > On Wed, Apr 8, 2015 at 1:09 PM, Fujii Masao wrote: >> On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko >> wrote: >>> On Wed, Apr 8, 2015 at 1:11 AM, Fabrízio de Royes Mello >>> wrote: On Tue, Apr 7, 2015 at 1:04 PM, Sawada Masa

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-08 Thread Sawada Masahiko
On Wed, Apr 8, 2015 at 1:09 PM, Fujii Masao wrote: > On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko wrote: >> On Wed, Apr 8, 2015 at 1:11 AM, Fabrízio de Royes Mello >> wrote: >>> >>> On Tue, Apr 7, 2015 at 1:04 PM, Sawada Masahiko >>> wrote: On Tue, Apr 7, 2015 at 10:12 PM, Fabrízio

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-07 Thread Fujii Masao
On Wed, Apr 8, 2015 at 1:57 AM, Sawada Masahiko wrote: > On Wed, Apr 8, 2015 at 1:11 AM, Fabrízio de Royes Mello > wrote: >> >> On Tue, Apr 7, 2015 at 1:04 PM, Sawada Masahiko >> wrote: >>> >>> On Tue, Apr 7, 2015 at 10:12 PM, Fabrízio de Royes Mello >>> wrote: >>> > >>> > On Tue, Apr 7, 2015 a

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-07 Thread Sawada Masahiko
On Wed, Apr 8, 2015 at 1:11 AM, Fabrízio de Royes Mello wrote: > > On Tue, Apr 7, 2015 at 1:04 PM, Sawada Masahiko > wrote: >> >> On Tue, Apr 7, 2015 at 10:12 PM, Fabrízio de Royes Mello >> wrote: >> > >> > On Tue, Apr 7, 2015 at 7:22 AM, Sawada Masahiko >> > wrote: >> >> >> >> Thank you for yo

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-07 Thread Fabrízio de Royes Mello
On Tue, Apr 7, 2015 at 1:04 PM, Sawada Masahiko wrote: > > On Tue, Apr 7, 2015 at 10:12 PM, Fabrízio de Royes Mello > wrote: > > > > On Tue, Apr 7, 2015 at 7:22 AM, Sawada Masahiko > > wrote: > >> > >> Thank you for your reviewing. > >> I modified the patch and attached latest version patch(v7).

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-07 Thread Sawada Masahiko
On Tue, Apr 7, 2015 at 10:12 PM, Fabrízio de Royes Mello wrote: > > On Tue, Apr 7, 2015 at 7:22 AM, Sawada Masahiko > wrote: >> >> Thank you for your reviewing. >> I modified the patch and attached latest version patch(v7). >> Please have a look it. >> > > Looks good to me. Attached patch (v8) ju

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-07 Thread Fabrízio de Royes Mello
On Tue, Apr 7, 2015 at 7:22 AM, Sawada Masahiko wrote: > > Thank you for your reviewing. > I modified the patch and attached latest version patch(v7). > Please have a look it. > Looks good to me. Attached patch (v8) just fix a tab indentation in gram.y. Regards, -- Fabrízio de Royes Mello Consu

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-07 Thread Sawada Masahiko
On Tue, Apr 7, 2015 at 9:32 AM, Fabrízio de Royes Mello wrote: > > On Mon, Apr 6, 2015 at 10:21 AM, Sawada Masahiko > wrote: >> >> On Fri, Mar 13, 2015 at 5:10 PM, Kyotaro HORIGUCHI >> wrote: >> > Hello, I have some trivial comments about the latest patch. >> > >> > At Thu, 12 Mar 2015 21:15:14

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-06 Thread Fabrízio de Royes Mello
On Mon, Apr 6, 2015 at 10:21 AM, Sawada Masahiko wrote: > > On Fri, Mar 13, 2015 at 5:10 PM, Kyotaro HORIGUCHI > wrote: > > Hello, I have some trivial comments about the latest patch. > > > > At Thu, 12 Mar 2015 21:15:14 +0900, Sawada Masahiko < sawada.m...@gmail.com> wrote in > > sawada.mshk> O

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-04-06 Thread Sawada Masahiko
On Fri, Mar 13, 2015 at 5:10 PM, Kyotaro HORIGUCHI wrote: > Hello, I have some trivial comments about the latest patch. > > At Thu, 12 Mar 2015 21:15:14 +0900, Sawada Masahiko > wrote in > sawada.mshk> On Thu, Mar 12, 2015 at 6:36 AM, Jim Nasby > wrote: >> >>> >Are the parenthesis necessary?

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Robert Haas
On Fri, Mar 13, 2015 at 8:57 AM, Jim Nasby wrote: > Yeah, that doesn't sound like a good tradeoff compared to making people type > some extra ()s. :( > > We should at least support ()s on the other commands though, so that we're > consistent. I think we've been moving slowly in that direction, bu

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Jim Nasby
On 3/13/15 6:48 AM, Robert Haas wrote: On Wed, Mar 11, 2015 at 5:36 PM, Jim Nasby wrote: The thing is, ()s are actually an odd-duck. Very little supports it, and while COPY allows it they're not required. EXPLAIN is a different story, because that's not WITH; we're actually using () *instead of

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Robert Haas
On Wed, Mar 11, 2015 at 5:36 PM, Jim Nasby wrote: > The thing is, ()s are actually an odd-duck. Very little supports it, and > while COPY allows it they're not required. EXPLAIN is a different story, > because that's not WITH; we're actually using () *instead of* WITH. Generally, I think the comm

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-13 Thread Kyotaro HORIGUCHI
Hello, I have some trivial comments about the latest patch. At Thu, 12 Mar 2015 21:15:14 +0900, Sawada Masahiko wrote in sawada.mshk> On Thu, Mar 12, 2015 at 6:36 AM, Jim Nasby wrote: > >>> >Are the parenthesis necessary? No other WITH option requires them, other > >>> >than create table/matv

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-12 Thread Sawada Masahiko
On Thu, Mar 12, 2015 at 6:36 AM, Jim Nasby wrote: > On 3/11/15 6:33 AM, Sawada Masahiko wrote: >>> >>> As a refresher, current commands are: >>> > >>> >VACUUM (ANALYZE, VERBOSE) table1 (col1); >>> >REINDEX INDEX index1 FORCE; >>> >COPY table1 FRO

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-12 Thread Sawada Masahiko
On Tue, Mar 10, 2015 at 5:05 PM, Jim Nasby wrote: > On 3/9/15 9:43 PM, Sawada Masahiko wrote: >> >> On Fri, Mar 6, 2015 at 11:07 AM, Jim Nasby >> wrote: >>> >>> On 3/2/15 10:58 AM, Sawada Masahiko wrote: On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby wrote: > > > On 2

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-11 Thread Jim Nasby
On 3/11/15 6:33 AM, Sawada Masahiko wrote: As a refresher, current commands are: > >VACUUM (ANALYZE, VERBOSE) table1 (col1); >REINDEX INDEX index1 FORCE; >COPY table1 FROM 'file.txt' WITH (FORMAT csv); >CREATE MATERIALIZED VIEW mv1 WITH (storageparam, ...) AS q

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-11 Thread Sawada Masahiko
On Tue, Mar 10, 2015 at 5:05 PM, Jim Nasby wrote: > On 3/9/15 9:43 PM, Sawada Masahiko wrote: >> >> On Fri, Mar 6, 2015 at 11:07 AM, Jim Nasby >> wrote: >>> >>> On 3/2/15 10:58 AM, Sawada Masahiko wrote: On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby wrote: > > > On 2

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-10 Thread Jim Nasby
On 3/9/15 9:43 PM, Sawada Masahiko wrote: On Fri, Mar 6, 2015 at 11:07 AM, Jim Nasby wrote: On 3/2/15 10:58 AM, Sawada Masahiko wrote: On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby wrote: On 2/24/15 8:28 AM, Sawada Masahiko wrote: According to the above discussion, VACUUM and REINDEX shoul

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-09 Thread Sawada Masahiko
On Fri, Mar 6, 2015 at 11:07 AM, Jim Nasby wrote: > On 3/2/15 10:58 AM, Sawada Masahiko wrote: >> >> On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby >> wrote: >>> >>> On 2/24/15 8:28 AM, Sawada Masahiko wrote: > > > According to the above discussion, VACUUM and REINDEX should have > tr

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-05 Thread Jim Nasby
On 3/2/15 10:58 AM, Sawada Masahiko wrote: On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby wrote: On 2/24/15 8:28 AM, Sawada Masahiko wrote: According to the above discussion, VACUUM and REINDEX should have trailing options. Tom seems (to me) suggesting that SQL-style (bare word preceded by WITH)

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-02 Thread Sawada Masahiko
On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby wrote: > On 2/24/15 8:28 AM, Sawada Masahiko wrote: >>> >>> According to the above discussion, VACUUM and REINDEX should have >>> trailing options. Tom seems (to me) suggesting that SQL-style >>> (bare word preceded by WITH) options and Jim suggesting '()

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-24 Thread Jim Nasby
On 2/24/15 8:28 AM, Sawada Masahiko wrote: According to the above discussion, VACUUM and REINDEX should have trailing options. Tom seems (to me) suggesting that SQL-style (bare word preceded by WITH) options and Jim suggesting '()' style options? (Anyway VACUUM gets the*third additional* option

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-24 Thread Sawada Masahiko
On Fri, Feb 20, 2015 at 12:24 PM, Kyotaro HORIGUCHI wrote: > Hello, > > I showed an extreme number of examples to include *almost of all* > variations of existing syntax of option specification. And showed > what if all variations could be used for all commands. It was > almost a mess. Sorry for t

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-19 Thread Kyotaro HORIGUCHI
Hello, I showed an extreme number of examples to include *almost of all* variations of existing syntax of option specification. And showed what if all variations could be used for all commands. It was almost a mess. Sorry for the confusion. I think the issues at our hands are, - Options locati

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-18 Thread Sawada Masahiko
> VACUUM [FULL] [FREEZE] ... [ANALYZE] [tname [(cname, ...)] > | VACUUM [({FULL [bool]|FREEZE [bool]|...}[,...])] [tname [(cname, ...)] > | VACUUM [tname [(cname, ...)] [[WITH ]({FULL [bool]|FREEZE [bool]|...})] > > REINDEX [{INDEX|TABLE|...}] name [[WITH] (VERBOSE [bool]|...)] > > EXPLAIN [[WITH

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-17 Thread Jim Nasby
On 2/16/15 9:43 PM, Kyotaro HORIGUCHI wrote: Hello, I had a look on gram.y and found other syntaxes using WITH option clause. At Wed, 11 Feb 2015 14:34:17 -0600, Jim Nasby wrote in<54dbbcc9.1020...@bluetreble.com> >I suspect at least some of this stems from how command line programs >tend to

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-16 Thread Kyotaro HORIGUCHI
Hello, I had a look on gram.y and found other syntaxes using WITH option clause. At Wed, 11 Feb 2015 14:34:17 -0600, Jim Nasby wrote in <54dbbcc9.1020...@bluetreble.com> > I suspect at least some of this stems from how command line programs > tend to process options before arguments. I tend to a

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-11 Thread Jim Nasby
On 2/5/15 12:01 PM, Tom Lane wrote: Robert Haas writes: We've got a mix of styles for extensible options right now: That we do. So COPY puts the options at the very end, but EXPLAIN and VACUUM put them right after the command name. I prefer the latter style and would vote to adopt it here.

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-05 Thread Tom Lane
Robert Haas writes: > We've got a mix of styles for extensible options right now: That we do. > So COPY puts the options at the very end, but EXPLAIN and VACUUM put > them right after the command name. I prefer the latter style and > would vote to adopt it here. Meh. Options-at-the-end seems

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-05 Thread Robert Haas
On Wed, Feb 4, 2015 at 8:24 PM, Tom Lane wrote: > Kyotaro HORIGUCHI writes: >> The phrase "{INDEX | TABLE |..} name" seems to me indivisible as >> target specification. IMHO, the options for VACUUM and so is >> placed *just after* command name, not *before* the target. > >> If this is right, the

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-04 Thread David G Johnston
Tom Lane-2 wrote > Kyotaro HORIGUCHI < > horiguchi.kyotaro@.co > > writes: >> The phrase "{INDEX | TABLE |..} name" seems to me indivisible as >> target specification. IMHO, the options for VACUUM and so is >> placed *just after* command name, not *before* the target. > >> If this is right, the

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-04 Thread Tom Lane
Kyotaro HORIGUCHI writes: > The phrase "{INDEX | TABLE |..} name" seems to me indivisible as > target specification. IMHO, the options for VACUUM and so is > placed *just after* command name, not *before* the target. > If this is right, the syntax would be like this. > REINDEX [ (option [, optio

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-04 Thread Kyotaro HORIGUCHI
Hello, > As per discussion, it seems to good with > REINDEX { INDEX | TABLE | etc } name [ ( option [, option ...] ) ] > or > REINDEX { INDEX | TABLE | etc } [ (option [, optoin ...] ) ] name > i.g., the options of reindex(VERBOSE and FORCE) are put at before or > after object name. > > Because o

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-04 Thread Sawada Masahiko
On Wed, Feb 4, 2015 at 2:44 PM, Tom Lane wrote: > Jim Nasby writes: >> On 2/3/15 5:08 PM, Tom Lane wrote: >>> Jim Nasby writes: VACUUM puts the options before the table name, so ISTM it'd be best to keep that with REINDEX. Either REINDEX (options) {INDEX | ...} or REINDEX {INDEX |

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Tom Lane
Jim Nasby writes: > On 2/3/15 5:08 PM, Tom Lane wrote: >> Jim Nasby writes: >>> VACUUM puts the options before the table name, so ISTM it'd be best to >>> keep that with REINDEX. Either REINDEX (options) {INDEX | ...} or >>> REINDEX {INDEX | ...} (options). >> Well, I really really don't like th

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Jim Nasby
On 2/3/15 5:08 PM, Tom Lane wrote: Jim Nasby writes: On 2/3/15 9:20 AM, Tom Lane wrote: Well, the object type is not an optional part of the command. It's *necessary*. I was thinking more like REINDEX { INDEX | TABLE | etc } name [ ( option [, option ...] ) ] VACUUM puts the options befor

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Fabrízio de Royes Mello
On Tue, Feb 3, 2015 at 8:26 PM, Jim Nasby wrote: > > On 2/3/15 9:20 AM, Tom Lane wrote: >>> >>> >i.g., I will add following syntax format, >>> >REINDEX ( { INDEX | TABLE | SCHEMA | SYSTEM | DATABASE } , [VERBOSE] ) >>> >name [FORCE]; >> >> Well, the object type is not an optional part of the comma

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Tom Lane
Jim Nasby writes: > On 2/3/15 9:20 AM, Tom Lane wrote: >> Well, the object type is not an optional part of the command. It's >> *necessary*. I was thinking more like >> REINDEX { INDEX | TABLE | etc } name [ ( option [, option ...] ) ] > VACUUM puts the options before the table name, so ISTM it

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Jim Nasby
On 2/3/15 9:20 AM, Tom Lane wrote: >i.g., I will add following syntax format, >REINDEX ( { INDEX | TABLE | SCHEMA | SYSTEM | DATABASE } , [VERBOSE] ) >name [FORCE]; Well, the object type is not an optional part of the command. It's *necessary*. I was thinking more like REINDEX { INDEX | TABLE

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Tom Lane
Andres Freund writes: > On 2015-02-03 10:20:03 -0500, Tom Lane wrote: >> Well, the object type is not an optional part of the command. It's >> *necessary*. I was thinking more like >> >> REINDEX { INDEX | TABLE | etc } name [ ( option [, option ...] ) ] >> >> option := FORCE | VERBOSE >> >> W

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Andres Freund
On 2015-02-03 10:20:03 -0500, Tom Lane wrote: > Sawada Masahiko writes: > > On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane wrote: > >> The way that FORCE was added to REINDEX was poorly thought out; let's not > >> double down on that with another option added without any consideration > >> for future

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Tom Lane
Sawada Masahiko writes: > On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane wrote: >> The way that FORCE was added to REINDEX was poorly thought out; let's not >> double down on that with another option added without any consideration >> for future expansion. I'd be happier if we adopted something simil

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Fabrízio de Royes Mello
On Tue, Feb 3, 2015 at 9:09 AM, Sawada Masahiko wrote: > > On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane wrote: > > Sawada Masahiko writes: > >> On Mon, Feb 2, 2015 at 9:21 PM, Michael Paquier > >> wrote: > >>> Now, I think that it may > >>> be better to provide the keyword VERBOSE before the type

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-03 Thread Sawada Masahiko
On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane wrote: > Sawada Masahiko writes: >> On Mon, Feb 2, 2015 at 9:21 PM, Michael Paquier >> wrote: >>> Now, I think that it may >>> be better to provide the keyword VERBOSE before the type of object >>> reindexed as REINDEX [ VERBOSE ] object. > >> Actually,

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-02 Thread Tom Lane
Sawada Masahiko writes: > On Mon, Feb 2, 2015 at 9:21 PM, Michael Paquier > wrote: >> Now, I think that it may >> be better to provide the keyword VERBOSE before the type of object >> reindexed as REINDEX [ VERBOSE ] object. > Actually, my first WIP version of patch added VERBOSE word at before

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-02 Thread Sawada Masahiko
On Mon, Feb 2, 2015 at 9:21 PM, Michael Paquier wrote: > On Mon, Feb 2, 2015 at 8:31 PM, Sawada Masahiko wrote: >> Attached patch adds VERBOSE option to REINDEX commands. >> Please give me feedbacks. > This could provide useful feedback to users. Thanks. > Now, I think that it may > be better t

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-02 Thread Michael Paquier
On Mon, Feb 2, 2015 at 8:31 PM, Sawada Masahiko wrote: > Attached patch adds VERBOSE option to REINDEX commands. > Please give me feedbacks. This could provide useful feedback to users. Now, I think that it may be better to provide the keyword VERBOSE before the type of object reindexed as REINDEX

[HACKERS] Proposal : REINDEX xxx VERBOSE

2015-02-02 Thread Sawada Masahiko
Hi all, Attached patch adds VERBOSE option to REINDEX commands. The another maintaining commands(VACUUM FULL, CLUSTER) has VERBOSE option, but REINDEX has not been had it. Examples is following, - REINDEX TABLE [postgres][5432](1)=# REINDEX TABLE VERBOSE hoge; INFO: index "hoge_idx" was reindex