pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
REINDEX VERBOSE unknown option
17+ messages / 5 participants
[nested] [flat]

Commits from this thread:
  2019-12-18 52dcfda487  Doc: Improve readability of options for REINDEX
* REINDEX VERBOSE unknown option
@ 2019-11-16 17:40  Josef Šimánek <josef.simanek@gmail.com>
  0 siblings, 1 reply; 17+ messages in thread

From: Josef Šimánek @ 2019-11-16 17:40 UTC (permalink / raw)
  To: pgsql-general

Hello,

according to https://www.postgresql.org/docs/11/sql-reindex.html VERBOSE
option is valid for REINDEX command for 11.3 PostgreSQL server. Anyway I'm
getting error using VERBOSE option.

project_production=# REINDEX VERBOSE TABLE sales;
ERROR:  syntax error at or near "VERBOSE"
LINE 1: REINDEX VERBOSE TABLE sales;

Time: 0.235 ms

I'm wondering if I'm doing anything wrong or actual documentation is wrong.
Any ideas?

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-16 17:43  Josef Šimánek <josef.simanek@gmail.com>
  parent: Josef Šimánek <josef.simanek@gmail.com>
  0 siblings, 2 replies; 17+ messages in thread

From: Josef Šimánek @ 2019-11-16 17:43 UTC (permalink / raw)
  To: pgsql-general

Ahh, I just tried to do the same with reindexdb cli tool and the
actual syntax is REINDEX (VERBOSE) TABLE sales; Sorry for unnecessary
question. Anyway maybe we can add this to documentation as a example. I can
prepare patch for this if welcomed.

so 16. 11. 2019 v 18:40 odesílatel Josef Šimánek <josef.simanek@gmail.com>
napsal:

> Hello,
>
> according to https://www.postgresql.org/docs/11/sql-reindex.html VERBOSE
> option is valid for REINDEX command for 11.3 PostgreSQL server. Anyway I'm
> getting error using VERBOSE option.
>
> project_production=# REINDEX VERBOSE TABLE sales;
> ERROR:  syntax error at or near "VERBOSE"
> LINE 1: REINDEX VERBOSE TABLE sales;
>
> Time: 0.235 ms
>
> I'm wondering if I'm doing anything wrong or actual documentation is
> wrong. Any ideas?
>

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-17 03:41  Pavel Stehule <pavel.stehule@gmail.com>
  parent: Josef Šimánek <josef.simanek@gmail.com>
  1 sibling, 1 reply; 17+ messages in thread

From: Pavel Stehule @ 2019-11-17 03:41 UTC (permalink / raw)
  To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: pgsql-general

so 16. 11. 2019 v 18:43 odesílatel Josef Šimánek <josef.simanek@gmail.com>
napsal:

> Ahh, I just tried to do the same with reindexdb cli tool and the
> actual syntax is REINDEX (VERBOSE) TABLE sales; Sorry for unnecessary
> question. Anyway maybe we can add this to documentation as a example. I can
> prepare patch for this if welcomed.
>

Documentation patch is good idea.

Pavel


> so 16. 11. 2019 v 18:40 odesílatel Josef Šimánek <josef.simanek@gmail.com>
> napsal:
>
>> Hello,
>>
>> according to https://www.postgresql.org/docs/11/sql-reindex.html VERBOSE
>> option is valid for REINDEX command for 11.3 PostgreSQL server. Anyway I'm
>> getting error using VERBOSE option.
>>
>> project_production=# REINDEX VERBOSE TABLE sales;
>> ERROR:  syntax error at or near "VERBOSE"
>> LINE 1: REINDEX VERBOSE TABLE sales;
>>
>> Time: 0.235 ms
>>
>> I'm wondering if I'm doing anything wrong or actual documentation is
>> wrong. Any ideas?
>>
>

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-18 06:42  Michael Paquier <michael@paquier.xyz>
  parent: Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 17+ messages in thread

From: Michael Paquier @ 2019-11-18 06:42 UTC (permalink / raw)
  To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; pgsql-general

On Sun, Nov 17, 2019 at 04:41:59AM +0100, Pavel Stehule wrote:
> Documentation patch is good idea.

The documentation is rather clear about the need to of parenthesis
when using the VERBOSE option, and that it is not a mandatory option:
REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-18 09:27  Josef Šimánek <josef.simanek@gmail.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 17+ messages in thread

From: Josef Šimánek @ 2019-11-18 09:27 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-general

po 18. 11. 2019 v 7:42 odesílatel Michael Paquier <michael@paquier.xyz>
napsal:

> On Sun, Nov 17, 2019 at 04:41:59AM +0100, Pavel Stehule wrote:
> > Documentation patch is good idea.
>
> The documentation is rather clear about the need to of parenthesis
> when using the VERBOSE option, and that it is not a mandatory option:
> REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name
>

This is clear once you understand what does it mean. I was aware of VERBOSE
option of EXPLAIN and tried to use it without needed parentheses (the same
way EXPLAIN can understand it). In the parameter list of REINDEX, it is
still called VERBOSE (not "( VERBOSE )") and there's no info
that parentheses are needed. It looks the same parameter as the other ones
and I have tried to use it the same way. That's the origin of my confusion.
I was looking at examples first to see if there's any using VERBOSE to take
a look what is wrong on my side, but there is none. Including example with
VERBOSE will make it easier at least for me.

Current example "Rebuild all the indexes on the table my_table:" can be
modified to "Rebuild all the indexes and print progress report on the table
my_table:".

PS: AFAIK VERBOSE is option for EXPLAIN, but parameter for REINDEX. Is that
the reason for different syntax?


> --
> Michael
>

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-18 11:46  Michael Paquier <michael@paquier.xyz>
  parent: Josef Šimánek <josef.simanek@gmail.com>
  0 siblings, 1 reply; 17+ messages in thread

From: Michael Paquier @ 2019-11-18 11:46 UTC (permalink / raw)
  To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-general

On Mon, Nov 18, 2019 at 10:27:24AM +0100, Josef Šimánek wrote:
> This is clear once you understand what does it mean. I was aware of VERBOSE
> option of EXPLAIN and tried to use it without needed parentheses (the same
> way EXPLAIN can understand it). In the parameter list of REINDEX, it is
> still called VERBOSE (not "( VERBOSE )") and there's no info
> that parentheses are needed.

What would you do in the documentation once there is support for more
than one option then?

The grammar is done this way to remain extensible.  If you look at any
command in the documentation, there are two things to be aware of:
1) Clauses within square brackets are optional.
2) Multiple clauses within braces and separated by '|' mean that at
least one is mandatory.

Parenthesis do not matter here.  They are part of the query syntax.

> PS: AFAIK VERBOSE is option for EXPLAIN, but parameter for REINDEX. Is that
> the reason for different syntax?

Mainly historical reasons.  REINDEX VERBOSE has been added in 9.5.
EXPLAIN VERBOSE is around since at least 7.1.  Using options within
parenthesis is preferred lately because it is much easier to make the
grammar more extensible for future purposes and it eases the option
parsing.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-18 12:24  Geoff Winkless <pgsqladmin@geoff.dj>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 17+ messages in thread

From: Geoff Winkless @ 2019-11-18 12:24 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; Pavel Stehule <pavel.stehule@gmail.com>; pgsql-general

On Mon, 18 Nov 2019 at 11:46, Michael Paquier <michael@paquier.xyz> wrote:
> On Mon, Nov 18, 2019 at 10:27:24AM +0100, Josef Šimánek wrote:
> > This is clear once you understand what does it mean. I was aware of VERBOSE
> > option of EXPLAIN and tried to use it without needed parentheses (the same
> > way EXPLAIN can understand it). In the parameter list of REINDEX, it is
> > still called VERBOSE (not "( VERBOSE )") and there's no info
> > that parentheses are needed.
[snip]
> Mainly historical reasons.  REINDEX VERBOSE has been added in 9.5.
> EXPLAIN VERBOSE is around since at least 7.1.  Using options within
> parenthesis is preferred lately because it is much easier to make the
> grammar more extensible for future purposes and it eases the option
> parsing.

All well and good (although personally I think it's arguable whether
it's productive to have two different syntaxes for something that in
the user's perspective does the same thing). But if the parentheses
are part of the parameter, I think putting the parentheses in the
parameter list might be a good compromise.

Geoff





^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-18 22:24  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: Geoff Winkless <pgsqladmin@geoff.dj>
  0 siblings, 1 reply; 17+ messages in thread

From: Peter J. Holzer @ 2019-11-18 22:24 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2019-11-18 12:24:40 +0000, Geoff Winkless wrote:
> On Mon, 18 Nov 2019 at 11:46, Michael Paquier <michael@paquier.xyz> wrote:
> > On Mon, Nov 18, 2019 at 10:27:24AM +0100, Josef Šimánek wrote:
> > > This is clear once you understand what does it mean. I was aware of VERBOSE
> > > option of EXPLAIN and tried to use it without needed parentheses (the same
> > > way EXPLAIN can understand it). In the parameter list of REINDEX, it is
> > > still called VERBOSE (not "( VERBOSE )") and there's no info
> > > that parentheses are needed.
[...]
> But if the parentheses are part of the parameter, I think putting the
> parentheses in the parameter list might be a good compromise.

The parentheses aren't part of the parameter. They are part of the
syntax of the command.

It might useful to distinguish better between symbols which must be
typed as shown ("REINDEX", "(", ")", etc. in this case) and those which
describe the grammar ("[", "]", "name" in this case).

Maybe print the square brackets in bold and italics like "name"? But
that is just the opposite of the usual convention.

How about this?

* Terminals (stuff that has to be typed as shown) in bold.

* Non-Terminals (stuff which has to be replaced) in italic.

* Meta-characters ([, ], |, ...) in regular type.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-19 11:37  Geoff Winkless <pgsqladmin@geoff.dj>
  parent: Peter J. Holzer <hjp-pgsql@hjp.at>
  0 siblings, 2 replies; 17+ messages in thread

From: Geoff Winkless @ 2019-11-19 11:37 UTC (permalink / raw)
  To: Peter J. Holzer <hjp-pgsql@hjp.at>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Mon, 18 Nov 2019 at 22:24, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
>
> On 2019-11-18 12:24:40 +0000, Geoff Winkless wrote:
> > On Mon, 18 Nov 2019 at 11:46, Michael Paquier <michael@paquier.xyz> wrote:
> > > On Mon, Nov 18, 2019 at 10:27:24AM +0100, Josef Šimánek wrote:
> > > > This is clear once you understand what does it mean. I was aware of VERBOSE
> > > > option of EXPLAIN and tried to use it without needed parentheses (the same
> > > > way EXPLAIN can understand it). In the parameter list of REINDEX, it is
> > > > still called VERBOSE (not "( VERBOSE )") and there's no info
> > > > that parentheses are needed.
> [...]
> > But if the parentheses are part of the parameter, I think putting the
> > parentheses in the parameter list might be a good compromise.
>
> The parentheses aren't part of the parameter. They are part of the
> syntax of the command.

Then at the very least draw attention to the fact that the parentheses
are required in the description of the parameter in the notes.

It's bad enough that you have the inconsistency that REINDEX VERBOSE
requires parentheses while the more recent REINDEX CONCURRENTLY does
not (presumably to match the syntax of CREATE INDEX CONCURRENTLY),
without insisting that the user parse the difference between { and (
in the manual (not the easiest difference to scan) before they can use
the command.

> How about this?
>
> * Terminals (stuff that has to be typed as shown) in bold.
>
> * Non-Terminals (stuff which has to be replaced) in italic.
>
> * Meta-characters ([, ], |, ...) in regular type.

Even if you do that you're still requiring the user to parse syntax
according to esoteric rules. I'm not sure that changing the rules
helps that much.

Geoff





^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-20 03:59  Michael Paquier <michael@paquier.xyz>
  parent: Geoff Winkless <pgsqladmin@geoff.dj>
  1 sibling, 0 replies; 17+ messages in thread

From: Michael Paquier @ 2019-11-20 03:59 UTC (permalink / raw)
  To: Geoff Winkless <pgsqladmin@geoff.dj>; +Cc: Peter J. Holzer <hjp-pgsql@hjp.at>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Tue, Nov 19, 2019 at 11:37:04AM +0000, Geoff Winkless wrote:
> It's bad enough that you have the inconsistency that REINDEX VERBOSE
> requires parentheses while the more recent REINDEX CONCURRENTLY does
> not (presumably to match the syntax of CREATE INDEX CONCURRENTLY),
> without insisting that the user parse the difference between { and (
> in the manual (not the easiest difference to scan) before they can use
> the command.

The first implementations of REINDEX CONCURRENTLY used the existing
grammar.  There was also a discussion when the feature was close to
commit about exactly that and I preferred the parenthesis option.
Who won t the end?  Consistency with the existing grammar for
CREATE/DROP INDEX here. 

>> How about this?
>>
>> * Terminals (stuff that has to be typed as shown) in bold.
>>
>> * Non-Terminals (stuff which has to be replaced) in italic.
>>
>> * Meta-characters ([, ], |, ...) in regular type.
> 
> Even if you do that you're still requiring the user to parse syntax
> according to esoteric rules. I'm not sure that changing the rules
> helps that much.

This does not concern only the page for REINDEX.  Perhaps this could
be improved, but I am not sure how and particularly if changing it is
worth it as many people are used to the existing way of presenting the
commands synopsis as well.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-20 22:48  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: Geoff Winkless <pgsqladmin@geoff.dj>
  1 sibling, 1 reply; 17+ messages in thread

From: Peter J. Holzer @ 2019-11-20 22:48 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2019-11-19 11:37:04 +0000, Geoff Winkless wrote:
> Even if you do that you're still requiring the user to parse syntax
> according to esoteric rules.

Oh, please. Those "esoteric rules" have been in wide-spread use for
decades. If you look at any manual which tries to explain the syntax of
a programming language, markup language or something similar in a
(semi-)formal way, it probably uses something very similar. (More formal
texts often use BNF (or a variant), which are more expressive, but
harder to read. Personally I like syntax diagrams (sometimes called
railroad diagrams, but they seem to have mostly fallen out of fashion)

And of course, like almost any manual, the PostgreSQL manual explains
the notation in the preface:
https://www.postgresql.org/docs/current/notation.html
(Paper books are at an advantage here that readers usually actually
start at the beginning)

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-21 09:43  Geoff Winkless <pgsqladmin@geoff.dj>
  parent: Peter J. Holzer <hjp-pgsql@hjp.at>
  0 siblings, 1 reply; 17+ messages in thread

From: Geoff Winkless @ 2019-11-21 09:43 UTC (permalink / raw)
  To: Peter J. Holzer <hjp-pgsql@hjp.at>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Wed, 20 Nov 2019 at 22:48, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
>
> On 2019-11-19 11:37:04 +0000, Geoff Winkless wrote:
> > Even if you do that you're still requiring the user to parse syntax
> > according to esoteric rules.
>
> Oh, please. Those "esoteric rules" have been in wide-spread use for
> decades.

It wasn't meant to be insulting, I meant "esoteric" in the strict
sense: that you need to have specific knowledge to parse them.

My point was that modifying the rules (by making certain things bold
or italic) wouldn't really solve the problem - if you don't know what
the rules are, you're unlikely to be any better off if someone adds to
them.

Geoff





^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-21 15:32  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: Geoff Winkless <pgsqladmin@geoff.dj>
  0 siblings, 1 reply; 17+ messages in thread

From: Peter J. Holzer @ 2019-11-21 15:32 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2019-11-21 09:43:26 +0000, Geoff Winkless wrote:
> On Wed, 20 Nov 2019 at 22:48, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
> >
> > On 2019-11-19 11:37:04 +0000, Geoff Winkless wrote:
> > > Even if you do that you're still requiring the user to parse syntax
> > > according to esoteric rules.
> >
> > Oh, please. Those "esoteric rules" have been in wide-spread use for
> > decades.
> 
> It wasn't meant to be insulting, I meant "esoteric" in the strict
> sense: that you need to have specific knowledge to parse them.

I didn't understand it as insulting (why would I?), but don't think this
convention is "requiring ... knowledge that is restricted to a small
group" (Merriam-Webster). This specific convention for conveying grammar
rules is in my experience by far the most common (before BNF and
diagrams). Anybody who has read any documentation about any formal
language (e.g., a programming language, a query language, a markup or
configuration language) has very likely encountered it before.

Yes, you need specific knowledge to understand the PostgreSQL
documentation. For starters, you need to know English (or one the
handful languages in which it has been translated). You need to know
what a relational database is and why and how you would use one. You
need some generic knowledge about computing (what is a "client/server
model"? How do I start a command line tool?), etc. The convention for
describing the grammar is probably the least concern, and besides, it is
explained in the manual (unlike some concepts which are assumed to be
known).


> My point was that modifying the rules (by making certain things bold
> or italic) wouldn't really solve the problem - if you don't know what
> the rules are, you're unlikely to be any better off if someone adds to
> them.

Man is a pattern-matching animal. Even without an explicit explanation,
humans are quite good at deriving meaning from repeated patterns. So if
the parts you have to type verbatim are always printed in bold and parts
which have a meta-meaning are always printed in italic and optional
parts are always enclosed in (italic) square brackets, people are very
likely to understand that
    <i>[</i> <b>( VERBOSE )</b> <i>]</i>
means that "( VERBOSE )" must be typed as is, but is optional. Even if
they can't tell you the rules. Simply because they have seen it a few
dozen times before. There is a reason why almost any technical
documentation uses some typographical convention and why those
conventions are almost always very similar.

The PostgreSQL manual unfortunately uses the same typographic convention
for meta-characters ([], {}, |, ...) and terminals, which isn't as clear
as it could be.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-21 16:48  Geoff Winkless <pgsqladmin@geoff.dj>
  parent: Peter J. Holzer <hjp-pgsql@hjp.at>
  0 siblings, 1 reply; 17+ messages in thread

From: Geoff Winkless @ 2019-11-21 16:48 UTC (permalink / raw)
  To: Peter J. Holzer <hjp-pgsql@hjp.at>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Thu, 21 Nov 2019 at 15:32, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
> On 2019-11-21 09:43:26 +0000, Geoff Winkless wrote:
> > It wasn't meant to be insulting, I meant "esoteric" in the strict
> > sense: that you need to have specific knowledge to parse them.
>
> I didn't understand it as insulting (why would I?),

I've absolutely no idea, but I couldn't imagine why on Earth you would
apparently take such exception to it otherwise. Maybe writing
sarcastic bombast in response to something that hasn't annoyed you is
just your thing. Oh well, you do you.

> but don't think this
> convention is "requiring ... knowledge that is restricted to a small
> group" (Merriam-Webster).

That's entirely the case here. I'd say the number of people able to
understand something like BNF is vanishingly small in terms of the
7bn(?) world-population.

> This specific convention for conveying grammar
> rules is in my experience by far the most common (before BNF and
> diagrams). Anybody who has read any documentation about any formal
> language (e.g., a programming language, a query language, a markup or
> configuration language) has very likely encountered it before.

OK, but parentheses not being part of the rules, ie that they should
be read literally, is something that is knowledge specific to
postgresql, because "this specific convention" you blithely reference
is only a convention, and there are several instances where
programmers have their own version of this convention where
parentheses are part of the grammar, not the syntax.

> > My point was that modifying the rules (by making certain things bold
> > or italic) wouldn't really solve the problem - if you don't know what
> > the rules are, you're unlikely to be any better off if someone adds to
> > them.
>
> people are very
> likely to understand that
>     <i>[</i> <b>( VERBOSE )</b> <i>]</i>
> means that "( VERBOSE )" must be typed as is, but is optional. Even if
> they can't tell you the rules

Depending on the font, I'm not at all confident that I could tell the
difference between <b><i>( VERBOSE )</i></b> and (<b><i> VERBOSE
</i></b>) unless they're actually next to each other.

Geoff





^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-11-21 21:51  Peter J. Holzer <hjp-pgsql@hjp.at>
  parent: Geoff Winkless <pgsqladmin@geoff.dj>
  0 siblings, 0 replies; 17+ messages in thread

From: Peter J. Holzer @ 2019-11-21 21:51 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 2019-11-21 16:48:14 +0000, Geoff Winkless wrote:
> On Thu, 21 Nov 2019 at 15:32, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
> > On 2019-11-21 09:43:26 +0000, Geoff Winkless wrote:
> > > It wasn't meant to be insulting, I meant "esoteric" in the strict
> > > sense: that you need to have specific knowledge to parse them.
> >
> > I didn't understand it as insulting (why would I?),
> 
> I've absolutely no idea, but I couldn't imagine why on Earth you would
> apparently take such exception to it otherwise. Maybe writing
> sarcastic bombast in response to something that hasn't annoyed you is

I don't think we agree on the meaning of "sarcastic" and "bombast".


> > but don't think this convention is "requiring ... knowledge that is
> > restricted to a small group" (Merriam-Webster).
> 
> That's entirely the case here. I'd say the number of people able to
> understand something like BNF is vanishingly small in terms of the
> 7bn(?) world-population.

The number of people reading the PostgreSQL manual is also vanishingly
small in terms of the world-population. These two aren't independent.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-12-13 01:11  Josef Šimánek <josef.simanek@gmail.com>
  parent: Josef Šimánek <josef.simanek@gmail.com>
  1 sibling, 1 reply; 17+ messages in thread

From: Josef Šimánek @ 2019-12-13 01:11 UTC (permalink / raw)
  To: pgsql-general

I was thinking about this problem and possible documentation change again
and I have prepared documentation change to solve this. See attached
screenshot and HTML.

Code change can be found at https://github.com/simi/postgres/pull/3 (diff -
https://github.com/simi/postgres/pull/3.diff, patch -
https://github.com/simi/postgres/pull/3.patch).

This change is based on idea of Pave Stěhule, thanks a lot for that!
Similar approach was used recently in
https://www.postgresql.org/docs/devel/sql-dropdatabase.html.

so 16. 11. 2019 v 18:43 odesílatel Josef Šimánek <josef.simanek@gmail.com>
napsal:

> Ahh, I just tried to do the same with reindexdb cli tool and the
> actual syntax is REINDEX (VERBOSE) TABLE sales; Sorry for unnecessary
> question. Anyway maybe we can add this to documentation as a example. I can
> prepare patch for this if welcomed.
>
> so 16. 11. 2019 v 18:40 odesílatel Josef Šimánek <josef.simanek@gmail.com>
> napsal:
>
>> Hello,
>>
>> according to https://www.postgresql.org/docs/11/sql-reindex.html VERBOSE
>> option is valid for REINDEX command for 11.3 PostgreSQL server. Anyway I'm
>> getting error using VERBOSE option.
>>
>> project_production=# REINDEX VERBOSE TABLE sales;
>> ERROR:  syntax error at or near "VERBOSE"
>> LINE 1: REINDEX VERBOSE TABLE sales;
>>
>> Time: 0.235 ms
>>
>> I'm wondering if I'm doing anything wrong or actual documentation is
>> wrong. Any ideas?
>>
>

Attachments:

REINDEX.html (text/html, 35.1K) download <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0076)file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-reindex.html --> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>REINDEX</title><link rel="stylesheet" type="text/css" href="./REINDEX_files/stylesheet.css"><link rev="made" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/pgsql-docs@lists.postgresql.org"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="prev" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-refreshmaterializedview.html" title="REFRESH MATERIALIZED VIEW"><link rel="next" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-release-savepoint.html" title="RELEASE SAVEPOINT"></head><body style="scroll-behavior: auto;"><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tbody><tr><th colspan="5" align="center">REINDEX</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-refreshmaterializedview.html" title="REFRESH MATERIALIZED VIEW">Prev</a>&nbsp;</td><td width="10%" align="left"><a accesskey="u" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-commands.html" title="SQL Commands">Up</a></td><th width="60%" align="center">SQL Commands</th><td width="10%" align="right"><a accesskey="h" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/index.html" title="PostgreSQL 13devel Documentation">Home</a></td><td width="10%" align="right">&nbsp;<a accesskey="n" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-release-savepoint.html" title="RELEASE SAVEPOINT">Next</a></td></tr></tbody></table><hr></div><div class="refentry" id="SQL-REINDEX"><div class="titlepage"></div><a id="id-1.9.3.162.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle">REINDEX</span></h2><p>REINDEX — rebuild indexes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">REINDEX [ ( <em class="replaceable"><code>option</code></em> [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } [ CONCURRENTLY ] <em class="replaceable"><code>name</code></em> <span class="phrase">where <em class="replaceable"><code>option</code></em> can be:</span> VERBOSE </pre></div><div class="refsect1" id="id-1.9.3.162.5"><h2>Description</h2><p> <code class="command">REINDEX</code> rebuilds an index using the data stored in the index's table, replacing the old copy of the index. There are several scenarios in which to use <code class="command">REINDEX</code>: </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> An index has become corrupted, and no longer contains valid data. Although in theory this should never happen, in practice indexes can become corrupted due to software bugs or hardware failures. <code class="command">REINDEX</code> provides a recovery method. </p></li><li class="listitem"><p> An index has become <span class="quote">“<span class="quote">bloated</span>”</span>, that is it contains many empty or nearly-empty pages. This can occur with B-tree indexes in <span class="productname">PostgreSQL</span> under certain uncommon access patterns. <code class="command">REINDEX</code> provides a way to reduce the space consumption of the index by writing a new version of the index without the dead pages. See <a class="xref" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/routine-reindex.html" title="24.2. Routine Reindexing">Section&nbsp;24.2</a> for more information. </p></li><li class="listitem"><p> You have altered a storage parameter (such as fillfactor) for an index, and wish to ensure that the change has taken full effect. </p></li><li class="listitem"><p> If an index build fails with the <code class="literal">CONCURRENTLY</code> option, this index is left as <span class="quote">“<span class="quote">invalid</span>”</span>. Such indexes are useless but it can be convenient to use <code class="command">REINDEX</code> to rebuild them. Note that only <code class="command">REINDEX INDEX</code> is able to perform a concurrent build on an invalid index. </p></li></ul></div></div><div class="refsect1" id="id-1.9.3.162.6"><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">INDEX</code></span></dt><dd><p> Recreate the specified index. </p></dd><dt><span class="term"><code class="literal">TABLE</code></span></dt><dd><p> Recreate all indexes of the specified table. If the table has a secondary <span class="quote">“<span class="quote">TOAST</span>”</span> table, that is reindexed as well. </p></dd><dt><span class="term"><code class="literal">SCHEMA</code></span></dt><dd><p> Recreate all indexes of the specified schema. If a table of this schema has a secondary <span class="quote">“<span class="quote">TOAST</span>”</span> table, that is reindexed as well. Indexes on shared system catalogs are also processed. This form of <code class="command">REINDEX</code> cannot be executed inside a transaction block. </p></dd><dt><span class="term"><code class="literal">DATABASE</code></span></dt><dd><p> Recreate all indexes within the current database. Indexes on shared system catalogs are also processed. This form of <code class="command">REINDEX</code> cannot be executed inside a transaction block. </p></dd><dt><span class="term"><code class="literal">SYSTEM</code></span></dt><dd><p> Recreate all indexes on system catalogs within the current database. Indexes on shared system catalogs are included. Indexes on user tables are not processed. This form of <code class="command">REINDEX</code> cannot be executed inside a transaction block. </p></dd><dt><span class="term"><em class="replaceable"><code>name</code></em></span></dt><dd><p> The name of the specific index, table, or database to be reindexed. Index and table names can be schema-qualified. Presently, <code class="command">REINDEX DATABASE</code> and <code class="command">REINDEX SYSTEM</code> can only reindex the current database, so their parameter must match the current database's name. </p></dd><dt><span class="term"><code class="literal">CONCURRENTLY</code></span></dt><dd><p> When this option is used, <span class="productname">PostgreSQL</span> will rebuild the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table; whereas a standard index rebuild locks out writes (but not reads) on the table until it's done. There are several caveats to be aware of when using this option — see <a class="xref" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-reindex.html#SQL-REINDEX-CONCURRENTLY" title="Rebuilding Indexes Concurrently">Rebuilding Indexes Concurrently</a>. </p></dd><dt><span class="term"><code class="literal">VERBOSE</code></span></dt><dd><p> Prints a progress report as each index is reindexed. </p></dd></dl></div></div><div class="refsect1" id="id-1.9.3.162.7"><h2>Notes</h2><p> If you suspect corruption of an index on a user table, you can simply rebuild that index, or all indexes on the table, using <code class="command">REINDEX INDEX</code> or <code class="command">REINDEX TABLE</code>. </p><p> Things are more difficult if you need to recover from corruption of an index on a system table. In this case it's important for the system to not have used any of the suspect indexes itself. (Indeed, in this sort of scenario you might find that server processes are crashing immediately at start-up, due to reliance on the corrupted indexes.) To recover safely, the server must be started with the <code class="option">-P</code> option, which prevents it from using indexes for system catalog lookups. </p><p> One way to do this is to shut down the server and start a single-user <span class="productname">PostgreSQL</span> server with the <code class="option">-P</code> option included on its command line. Then, <code class="command">REINDEX DATABASE</code>, <code class="command">REINDEX SYSTEM</code>, <code class="command">REINDEX TABLE</code>, or <code class="command">REINDEX INDEX</code> can be issued, depending on how much you want to reconstruct. If in doubt, use <code class="command">REINDEX SYSTEM</code> to select reconstruction of all system indexes in the database. Then quit the single-user server session and restart the regular server. See the <a class="xref" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/app-postgres.html" title="postgres"><span class="refentrytitle"><span class="application">postgres</span></span></a> reference page for more information about how to interact with the single-user server interface. </p><p> Alternatively, a regular server session can be started with <code class="option">-P</code> included in its command line options. The method for doing this varies across clients, but in all <span class="application">libpq</span>-based clients, it is possible to set the <code class="envar">PGOPTIONS</code> environment variable to <code class="literal">-P</code> before starting the client. Note that while this method does not require locking out other clients, it might still be wise to prevent other users from connecting to the damaged database until repairs have been completed. </p><p> <code class="command">REINDEX</code> is similar to a drop and recreate of the index in that the index contents are rebuilt from scratch. However, the locking considerations are rather different. <code class="command">REINDEX</code> locks out writes but not reads of the index's parent table. It also takes an exclusive lock on the specific index being processed, which will block reads that attempt to use that index. In contrast, <code class="command">DROP INDEX</code> momentarily takes an exclusive lock on the parent table, blocking both writes and reads. The subsequent <code class="command">CREATE INDEX</code> locks out writes but not reads; since the index is not there, no read will attempt to use it, meaning that there will be no blocking but reads might be forced into expensive sequential scans. </p><p> Reindexing a single index or table requires being the owner of that index or table. Reindexing a schema or database requires being the owner of that schema or database. Note that is therefore sometimes possible for non-superusers to rebuild indexes of tables owned by other users. However, as a special exception, when <code class="command">REINDEX DATABASE</code>, <code class="command">REINDEX SCHEMA</code> or <code class="command">REINDEX SYSTEM</code> is issued by a non-superuser, indexes on shared catalogs will be skipped unless the user owns the catalog (which typically won't be the case). Of course, superusers can always reindex anything. </p><p> Reindexing partitioned tables or partitioned indexes is not supported. Each individual partition can be reindexed separately instead. </p><div class="refsect2" id="SQL-REINDEX-CONCURRENTLY"><h3>Rebuilding Indexes Concurrently</h3><a id="id-1.9.3.162.7.9.2" class="indexterm"></a><p> Rebuilding an index can interfere with regular operation of a database. Normally <span class="productname">PostgreSQL</span> locks the table whose index is rebuilt against writes and performs the entire index build with a single scan of the table. Other transactions can still read the table, but if they try to insert, update, or delete rows in the table they will block until the index rebuild is finished. This could have a severe effect if the system is a live production database. Very large tables can take many hours to be indexed, and even for smaller tables, an index rebuild can lock out writers for periods that are unacceptably long for a production system. </p><p> <span class="productname">PostgreSQL</span> supports rebuilding indexes with minimum locking of writes. This method is invoked by specifying the <code class="literal">CONCURRENTLY</code> option of <code class="command">REINDEX</code>. When this option is used, <span class="productname">PostgreSQL</span> must perform two scans of the table for each index that needs to be rebuilt and wait for termination of all existing transactions that could potentially use the index. This method requires more total work than a standard index rebuild and takes significantly longer to complete as it needs to wait for unfinished transactions that might modify the index. However, since it allows normal operations to continue while the index is being rebuilt, this method is useful for rebuilding indexes in a production environment. Of course, the extra CPU, memory and I/O load imposed by the index rebuild may slow down other operations. </p><p> The following steps occur in a concurrent reindex. Each step is run in a separate transaction. If there are multiple indexes to be rebuilt, then each step loops through all the indexes before moving to the next step. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> A new temporary index definition is added to the catalog <code class="literal">pg_index</code>. This definition will be used to replace the old index. A <code class="literal">SHARE UPDATE EXCLUSIVE</code> lock at session level is taken on the indexes being reindexed as well as their associated tables to prevent any schema modification while processing. </p></li><li class="listitem"><p> A first pass to build the index is done for each new index. Once the index is built, its flag <code class="literal">pg_index.indisready</code> is switched to <span class="quote">“<span class="quote">true</span>”</span> to make it ready for inserts, making it visible to other sessions once the transaction that performed the build is finished. This step is done in a separate transaction for each index. </p></li><li class="listitem"><p> Then a second pass is performed to add tuples that were added while the first pass was running. This step is also done in a separate transaction for each index. </p></li><li class="listitem"><p> All the constraints that refer to the index are changed to refer to the new index definition, and the names of the indexes are changed. At this point, <code class="literal">pg_index.indisvalid</code> is switched to <span class="quote">“<span class="quote">true</span>”</span> for the new index and to <span class="quote">“<span class="quote">false</span>”</span> for the old, and a cache invalidation is done causing all sessions that referenced the old index to be invalidated. </p></li><li class="listitem"><p> The old indexes have <code class="literal">pg_index.indisready</code> switched to <span class="quote">“<span class="quote">false</span>”</span> to prevent any new tuple insertions, after waiting for running queries that might reference the old index to complete. </p></li><li class="listitem"><p> The old indexes are dropped. The <code class="literal">SHARE UPDATE EXCLUSIVE</code> session locks for the indexes and the table are released. </p></li></ol></div><p> </p><p> If a problem arises while rebuilding the indexes, such as a uniqueness violation in a unique index, the <code class="command">REINDEX</code> command will fail but leave behind an <span class="quote">“<span class="quote">invalid</span>”</span> new index in addition to the pre-existing one. This index will be ignored for querying purposes because it might be incomplete; however it will still consume update overhead. The <span class="application">psql</span> <code class="command">\d</code> command will report such an index as <code class="literal">INVALID</code>: </p><pre class="programlisting">postgres=# \d tab Table "public.tab" Column | Type | Modifiers --------+---------+----------- col | integer | Indexes: "idx" btree (col) "idx_ccnew" btree (col) INVALID </pre><p> The recommended recovery method in such cases is to drop the invalid index and try again to perform <code class="command">REINDEX CONCURRENTLY</code>. The concurrent index created during the processing has a name ending in the suffix <code class="literal">ccnew</code>, or <code class="literal">ccold</code> if it is an old index definition which we failed to drop. Invalid indexes can be dropped using <code class="literal">DROP INDEX</code>, including invalid toast indexes. </p><p> Regular index builds permit other regular index builds on the same table to occur simultaneously, but only one concurrent index build can occur on a table at a time. In both cases, no other types of schema modification on the table are allowed meanwhile. Another difference is that a regular <code class="command">REINDEX TABLE</code> or <code class="command">REINDEX INDEX</code> command can be performed within a transaction block, but <code class="command">REINDEX CONCURRENTLY</code> cannot. </p><p> <code class="command">REINDEX SYSTEM</code> does not support <code class="command">CONCURRENTLY</code> since system catalogs cannot be reindexed concurrently. </p><p> Furthermore, indexes for exclusion constraints cannot be reindexed concurrently. If such an index is named directly in this command, an error is raised. If a table or database with exclusion constraint indexes is reindexed concurrently, those indexes will be skipped. (It is possible to reindex such indexes without the <code class="command">CONCURRENTLY</code> option.) </p></div></div><div class="refsect1" id="id-1.9.3.162.8"><h2>Examples</h2><p> Rebuild a single index: </p><pre class="programlisting">REINDEX INDEX my_index; </pre><p> </p><p> Rebuild all the indexes on the table <code class="literal">my_table</code> with progress report per index: </p><pre class="programlisting">REINDEX (VERBOSE) TABLE my_table; </pre><p> </p><p> Rebuild all indexes in a particular database, without trusting the system indexes to be valid already: </p><pre class="programlisting">$ <strong class="userinput"><code>export PGOPTIONS="-P"</code></strong> $ <strong class="userinput"><code>psql broken_db</code></strong> ... broken_db=&gt; REINDEX DATABASE broken_db; broken_db=&gt; \q </pre><p> Rebuild indexes for a table, without blocking read and write operations on involved relations while reindexing is in progress: </p><pre class="programlisting">REINDEX TABLE CONCURRENTLY my_broken_table; </pre></div><div class="refsect1" id="id-1.9.3.162.9"><h2>Compatibility</h2><p> There is no <code class="command">REINDEX</code> command in the SQL standard. </p></div><div class="refsect1" id="id-1.9.3.162.10"><h2>See Also</h2><span class="simplelist"><a class="xref" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-createindex.html" title="CREATE INDEX"><span class="refentrytitle">CREATE INDEX</span></a>, <a class="xref" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-dropindex.html" title="DROP INDEX"><span class="refentrytitle">DROP INDEX</span></a>, <a class="xref" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/app-reindexdb.html" title="reindexdb"><span class="refentrytitle"><span class="application">reindexdb</span></span></a></span></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tbody><tr><td width="40%" align="left"><a accesskey="p" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-refreshmaterializedview.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-commands.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/sql-release-savepoint.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">REFRESH MATERIALIZED VIEW&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="file:///home/retro/code/learn/pg/postgres/doc/src/sgml/html/index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;RELEASE SAVEPOINT</td></tr></tbody></table></div><div class="nsc-panel nsc-panel-compact nsc-hide" style=""> <div class="nsc-panel-move"></div> <div class="nsc-panel-tooltip"> <div class="nsc-panel-tooltip-layout" layout="row" layout-align="start center">CTRL+V to toggle the panel</div> </div> <div class="nsc-panel-layout" flex="" layout="row" layout-align="start center"> <div class="nsc-panel-groups" flex="" layout="row" layout-align="start start"> <!-- group --> <div class="nsc-panel-group" flex="none" layout="row" layout-align="start start"> <div class="nsc-panel-button separated active"> <div class="nsc-panel-select" flex="" layout="row"> <div class="nsc-panel-text nsc-noselect" flex="" layout="row" layout-align="center center"> <span class="nsc-icon nsc-icon-cursor-normal" data-i18n="videoPanelSimpleCursor" data-event="nimbus-editor-active-tools" data-event-param="cursorDefault">&nbsp;</span> </div> <div class="nsc-panel-trigger"> <span class="nsc-icon nsc-icon-arrow">&nbsp;</span> </div> </div> <div class="nsc-panel-dropdown to-top"> <ul flex="" layout="row" layout-align="start center"> <li class="nsc-panel-dropdown-icon" flex="" layout="row" layout-align="start center"> <span class="nsc-icon nsc-icon-cursor-shade" data-i18n="videoPanelFocusMouse" data-event="nimbus-editor-active-tools" data-event-param="cursorShadow">&nbsp;</span> </li> <li class="nsc-panel-dropdown-icon" flex="" layout="row" layout-align="start center"> <span class="nsc-icon nsc-icon-cursor-circle" data-i18n="videoPanelAnimatedCursor" data-event="nimbus-editor-active-tools" data-event-param="cursorRing">&nbsp;</span> </li> <!--<li class="nsc-panel-dropdown-icon " flex layout="row" layout-align="start center">--> <!--<span class="nsc-icon nsc-icon-cursor-tail"></span>--> <!--</li>--> <!--<li class="nsc-panel-dropdown-icon " flex layout="row" layout-align="start center">--> <!--<span class="nsc-icon nsc-icon-cursor-long"></span>--> <!--</li>--> <li class="nsc-panel-dropdown-icon" flex="" layout="row" layout-align="start center"> <span class="nsc-icon nsc-icon-cursor-normal" data-i18n="videoPanelSimpleCursor" data-event="nimbus-editor-active-tools" data-event-param="cursorDefault">&nbsp;</span> </li> <!--<li class="nsc-panel-dropdown-icon" flex layout="row" layout-align="start center">--> <!--<span class="nsc-icon nsc-icon-cursor-none" data-event="nimbus-editor-active-tools" data-event-param="cursorNone"></span>--> <!--</li>--> </ul> </div> </div> </div> <!-- /group --> <!-- group --> <div class="nsc-panel-group" flex="none" layout="row" layout-align="start start"> <button class="nsc-panel-button" type="button"> <span class="nsc-icon nsc-icon-pen" data-i18n="videoPanelPen" data-event="nimbus-editor-active-tools" data-event-param="pen">&nbsp;</span> </button> <button class="nsc-panel-button" type="button"> <span class="nsc-icon nsc-icon-arrow-line" data-i18n="videoPanelArrow" data-event="nimbus-editor-active-tools" data-event-param="arrow">&nbsp;</span> </button> <button class="nsc-panel-button" type="button"> <span class="nsc-icon nsc-icon-square" data-i18n="videoPanelSquare" data-event="nimbus-editor-active-tools" data-event-param="square">&nbsp;</span> </button> <div class="nsc-panel-button separated"> <div class="nsc-panel-select" flex="" layout="row"> <div class="nsc-panel-text nsc-noselect" flex="" layout="row" layout-align="center center"> <span class="nsc-icon nsc-icon-attention" data-i18n="videoPanelMark" data-event="nimbus-editor-active-tools" data-event-param="notifRed">&nbsp;</span> </div> <div class="nsc-panel-trigger"> <span class="nsc-icon nsc-icon-arrow">&nbsp;</span> </div> </div> <div class="nsc-panel-dropdown to-top"> <ul flex="" layout="row" layout-align="start center"> <li class="nsc-panel-dropdown-icon" flex="" layout="row" layout-align="start center"> <span class="nsc-icon nsc-icon-attention" data-i18n="videoPanelMark" data-event="nimbus-editor-active-tools" data-event-param="notifRed">&nbsp;</span> </li> <li class="nsc-panel-dropdown-icon" flex="" layout="row" layout-align="start center"> <span class="nsc-icon nsc-icon-question" data-i18n="videoPanelQuestion" data-event="nimbus-editor-active-tools" data-event-param="notifBlue">&nbsp;</span> </li> <li class="nsc-panel-dropdown-icon" flex="" layout="row" layout-align="start center"> <span class="nsc-icon nsc-icon-done" data-i18n="videoPanelCheckmark" data-event="nimbus-editor-active-tools" data-event-param="notifGreen">&nbsp;</span> </li> </ul> </div> </div> <div class="nsc-panel-button assembled"> <div class="nsc-panel-select" flex="" layout="row"> <div class="nsc-panel-text nsc-noselect" flex="" layout="row" layout-align="center center"> <span class="nsc-icon nsc-icon-fill-none nsc-panel-icon-fill"> <span class="nsc-panel-icon-fill-inner" id="nsc_panel_button_colors" style="background:#00FF00;" data-event="nimbus-editor-active-color" data-event-param="#00FF00">&nbsp;</span> </span> </div> <div class="nsc-panel-trigger"> <span class="nsc-icon nsc-icon-arrow">&nbsp;</span> </div> </div> <div class="nsc-panel-dropdown"> <div class="nsc-panel-drop-area"> <div class="nsc-panel-colors"> <!-- picked --> <div class="nsc-colors-picked"> <div class="nsc-colors-picked-layout" flex="" layout="row" layout-align="start start" layout-wrap=""> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#000000"> <span class="nsc-colors-picked-button-inner" style="background: #000000;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#0000FF"> <span class="nsc-colors-picked-button-inner" style="background: #0000FF;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#FF00FF"> <span class="nsc-colors-picked-button-inner" style="background: #FF00FF;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#00FFFF"> <span class="nsc-colors-picked-button-inner" style="background: #00FFFF;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#00FF00"> <span class="nsc-colors-picked-button-inner" style="background: #00FF00;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#FFFF00"> <span class="nsc-colors-picked-button-inner" style="background: #FFFF00;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#FF0000"> <span class="nsc-colors-picked-button-inner" style="background: #FF0000;">&nbsp;</span> </button> </div> <div class="nsc-colors-picked-item"> <button class="nsc-colors-picked-button" type="button" data-event="nimbus-editor-active-color" data-event-param="#FFFFFF"> <span class="nsc-colors-picked-button-inner" style="background: #FFFFFF;">&nbsp;</span> </button> </div> <!--<div class="nsc-colors-picked-item">--> <!--<button class="nsc-colors-picked-button custom" type="button"> --> <!--<i class="nsc-icon ic-color-custom"></i> --> <!--</button>--> <!--</div>--> </div> </div> <!-- /picked --> </div> </div> </div> </div> </div> <!-- /group --> <!-- group --> <div class="nsc-panel-group" flex="none" layout="row" layout-align="start start"> <button class="nsc-panel-button nsc-hide" type="button"> <span class="nsc-icon nsc-icon-eraser" data-i18n="videoPanelClear" data-event="nimbus-editor-active-tools" data-event-param="clear">&nbsp;</span> </button> <button class="nsc-panel-button" type="button"> <span class="nsc-icon nsc-icon-eraser-all" data-i18n="videoPanelClearAll" data-event="nimbus-editor-active-tools" data-event-param="clearAll">&nbsp;</span> </button> <button class="nsc-panel-button" type="button"> <span class="nsc-icon nsc-icon-webcam" data-i18n="videoPanelCamera" id="nimbus_web_camera_toggle">&nbsp;</span> </button> </div> <!-- /group --> </div> <div class="nsc-panel-actions" flex="none" layout="row" layout-align="start center"> <button class="nsc-panel-button big" type="button" id="nsc_panel_button_play" style="display: none;"> <span class="nsc-icon nsc-icon-play">&nbsp;</span> </button> <button class="nsc-panel-button big" type="button" id="nsc_panel_button_pause"> <span class="nsc-icon nsc-icon-pause">&nbsp;</span> </button> <button class="nsc-panel-button big" type="button" id="nsc_panel_button_stop"> <span class="nsc-icon nsc-icon-stop">&nbsp;</span> </button> </div> <!-- panel togglers --> <div class="nsc-panel-togglers" layout="row" layout-align="start center" flex="none"> <button class="nsc-panel-toggle-button" type="button"> <span class="nsc-icon nsc-icon-panel-close" data-i18n="videoPanelHideShowPanel">&nbsp;</span> </button> </div> <!-- /panel togglers --> </div> </div> <div class="nsc-video-editor nsc-hide"></div><div class="nsc-content-camera nsc-hide" style=""> <div class="nsc-content-camera-buttons" flex="none" layout="row" layout-align="start start"> <button class="nsc-content-camera-button" type="button" id="nsc_video_camera_collapse" style="display: none"> <span class="nsc-icon nsc-icon-panel-collapse"></span> </button> <button class="nsc-content-camera-button" type="button" id="nsc_video_camera_expand"> <span class="nsc-icon nsc-icon-panel-expand"></span> </button> <button class="nsc-content-camera-button" type="button" id="nsc_video_camera_close"> <span class="nsc-icon nsc-icon-panel-close"></span> </button> </div> <div class="nsc-content-camera-container"> <div class="nsc-content-camera-shadow"></div> </div> </div> </body></html>
screenshot--2019.12.13-02_03_50.png (image/png, 2.4M) download view image
^ permalink raw reply [nested|flat] 17+ messages in thread

* Re: REINDEX VERBOSE unknown option
@ 2019-12-18 12:10  Josef Šimánek <josef.simanek@gmail.com>
  parent: Josef Šimánek <josef.simanek@gmail.com>
  0 siblings, 0 replies; 17+ messages in thread

From: Josef Šimánek @ 2019-12-18 12:10 UTC (permalink / raw)
  To: pgsql-general

My patch was partially merged at
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=52dcfda48778d16683c64ca4372299a09...
.

Thanks to everyone involved in this discussion.

pá 13. 12. 2019 v 2:11 odesílatel Josef Šimánek <josef.simanek@gmail.com>
napsal:

> I was thinking about this problem and possible documentation change again
> and I have prepared documentation change to solve this. See attached
> screenshot and HTML.
>
> Code change can be found at https://github.com/simi/postgres/pull/3 (diff
> - https://github.com/simi/postgres/pull/3.diff, patch -
> https://github.com/simi/postgres/pull/3.patch).
>
> This change is based on idea of Pave Stěhule, thanks a lot for that!
> Similar approach was used recently in
> https://www.postgresql.org/docs/devel/sql-dropdatabase.html.
>
> so 16. 11. 2019 v 18:43 odesílatel Josef Šimánek <josef.simanek@gmail.com>
> napsal:
>
>> Ahh, I just tried to do the same with reindexdb cli tool and the
>> actual syntax is REINDEX (VERBOSE) TABLE sales; Sorry for unnecessary
>> question. Anyway maybe we can add this to documentation as a example. I can
>> prepare patch for this if welcomed.
>>
>> so 16. 11. 2019 v 18:40 odesílatel Josef Šimánek <josef.simanek@gmail.com>
>> napsal:
>>
>>> Hello,
>>>
>>> according to https://www.postgresql.org/docs/11/sql-reindex.html VERBOSE
>>> option is valid for REINDEX command for 11.3 PostgreSQL server. Anyway I'm
>>> getting error using VERBOSE option.
>>>
>>> project_production=# REINDEX VERBOSE TABLE sales;
>>> ERROR:  syntax error at or near "VERBOSE"
>>> LINE 1: REINDEX VERBOSE TABLE sales;
>>>
>>> Time: 0.235 ms
>>>
>>> I'm wondering if I'm doing anything wrong or actual documentation is
>>> wrong. Any ideas?
>>>
>>

^ permalink  raw  reply  [nested|flat] 17+ messages in thread


end of thread, other threads:[~2019-12-18 12:10 UTC | newest]

Thread overview: 17+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-16 17:40 REINDEX VERBOSE unknown option Josef Šimánek <josef.simanek@gmail.com>
2019-11-16 17:43 ` Josef Šimánek <josef.simanek@gmail.com>
2019-11-17 03:41   ` Pavel Stehule <pavel.stehule@gmail.com>
2019-11-18 06:42     ` Michael Paquier <michael@paquier.xyz>
2019-11-18 09:27       ` Josef Šimánek <josef.simanek@gmail.com>
2019-11-18 11:46         ` Michael Paquier <michael@paquier.xyz>
2019-11-18 12:24           ` Geoff Winkless <pgsqladmin@geoff.dj>
2019-11-18 22:24             ` Peter J. Holzer <hjp-pgsql@hjp.at>
2019-11-19 11:37               ` Geoff Winkless <pgsqladmin@geoff.dj>
2019-11-20 03:59                 ` Michael Paquier <michael@paquier.xyz>
2019-11-20 22:48                 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2019-11-21 09:43                   ` Geoff Winkless <pgsqladmin@geoff.dj>
2019-11-21 15:32                     ` Peter J. Holzer <hjp-pgsql@hjp.at>
2019-11-21 16:48                       ` Geoff Winkless <pgsqladmin@geoff.dj>
2019-11-21 21:51                         ` Peter J. Holzer <hjp-pgsql@hjp.at>
2019-12-13 01:11   ` Josef Šimánek <josef.simanek@gmail.com>
2019-12-18 12:10     ` Josef Šimánek <josef.simanek@gmail.com>

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