postgresql/src/bin
Michael Paquier 0a5f06b84d Fix a few issues with REINDEX grammar
This addresses a couple of bugs in the REINDEX grammar, introduced by
83011ce:
- A name was never specified for DATABASE/SYSTEM, even if the query
included one.  This caused such REINDEX queries to always work with any
object name, but we should complain if the object name specified does
not match the name of the database we are connected to.  A test is added
for this case in the main regression test suite, provided by Álvaro.
- REINDEX SYSTEM CONCURRENTLY [name] was getting rejected in the
parser.  Concurrent rebuilds are not supported for catalogs but the
error provided at execution time is more helpful for the user, and
allowing this flavor results in a simplification of the parsing logic.
- REINDEX DATABASE CONCURRENTLY was rebuilding the index in a
non-concurrent way, as the option was not being appended correctly in
the list of DefElems in ReindexStmt (REINDEX (CONCURRENTLY) DATABASE was
working fine.  A test is added in the TAP tests of reindexdb for this
case, where we already have a REINDEX DATABASE CONCURRENTLY query
running on a small-ish instance.  This relies on the work done in
2cbc3c1 for SYSTEM, but here we check if the OIDs of the index relations
match or not after the concurrent rebuild.  Note that in order to get
this part to work, I had to tweak the tests so as the index OID and
names are saved separately.  This change not affect the reliability or
of the coverage of the existing tests.

While on it, I have implemented a tweak in the grammar to reduce the
parsing by one branch, simplifying things even more.

Author: Michael Paquier, Álvaro Herrera
Discussion: https://postgr.es/m/YttqI6O64wDxGn0K@paquier.xyz
2022-07-26 10:16:26 +09:00
..
initdb Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_amcheck Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_archivecleanup Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_basebackup Remove unnecessary Windows-specific basebackup code. 2022-07-22 17:41:47 +12:00
pg_checksums Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_config Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_controldata Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_ctl Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_dump Allow users to skip logical replication of data having origin. 2022-07-21 08:47:38 +05:30
pg_resetwal Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_rewind Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_test_fsync Remove O_FSYNC and associated macros. 2022-07-22 12:41:17 +12:00
pg_test_timing Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_upgrade pg_upgrade: Adjust quoting style in message to match guidelines 2022-07-18 14:53:00 +02:00
pg_verifybackup Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pg_waldump Revert "Use wildcards instead of manually-maintained file lists in */nls.mk." 2022-07-13 14:29:10 -04:00
pgbench Remove redundant null pointer checks before free() 2022-07-03 11:47:15 +02:00
pgevent Update copyright for 2022 2022-01-07 19:04:57 -05:00
psql Add xheader_width pset option to psql 2022-07-25 14:25:02 -04:00
scripts Fix a few issues with REINDEX grammar 2022-07-26 10:16:26 +09:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00