postgresql/src/backend/commands
Michael Paquier 508300e2e1 Improve and fix some error handling for REINDEX INDEX/TABLE CONCURRENTLY
This improves the user experience when it comes to restrict several
flavors of REINDEX CONCURRENTLY.  First, for INDEX, remove a restriction
on shared relations as we already check after catalog relations.  Then,
for TABLE, add a proper error message when attempting to run the command
on system catalogs.  The code path of CREATE INDEX CONCURRENTLY already
complains about that, but if a REINDEX is issued then then the error
generated is confusing.

While on it, add more tests to check restrictions on catalog indexes and
on toast table/index for catalogs.  Some error messages are improved,
with wording suggestion coming from Tom Lane.

Reported-by: Tom Lane
Author: Michael Paquier
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/23694.1556806002@sss.pgh.pa.us
2019-05-10 08:18:46 +09:00
..
Makefile Move vacuumlazy.c into access/heap. 2019-01-15 12:06:19 -08:00
aggregatecmds.c Implement OR REPLACE option for CREATE AGGREGATE. 2019-03-19 01:16:50 +00:00
alter.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
amcmds.c Harden tableam against nonexistant / wrong kind of AMs. 2019-04-04 17:39:39 -07:00
analyze.c tableam: VACUUM and ANALYZE support. 2019-03-30 19:25:58 -07:00
async.c Move remaining code from tqual.[ch] to heapam.h / heapam_visibility.c. 2019-01-21 17:07:10 -08:00
cluster.c Allow pg_class xid & multixid horizons to not be set. 2019-04-23 21:42:12 -07:00
collationcmds.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
comment.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
constraint.c tableam: Add and use scan APIs. 2019-03-11 12:46:41 -07:00
conversioncmds.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
copy.c Remove unused struct member, enforce multi_insert callback presence. 2019-04-04 17:39:39 -07:00
createas.c tableam: Add table_finish_bulk_insert(). 2019-04-01 14:41:42 -07:00
dbcommands.c Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00
define.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
discard.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
dropcmds.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
event_trigger.c Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
explain.c Add SETTINGS option to EXPLAIN, to print modified settings. 2019-04-04 00:04:31 +02:00
extension.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
foreigncmds.c Fix error messages 2019-05-08 13:20:16 -04:00
functioncmds.c Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
indexcmds.c Improve and fix some error handling for REINDEX INDEX/TABLE CONCURRENTLY 2019-05-10 08:18:46 +09:00
lockcmds.c Fix more strcmp() calls using boolean-like comparisons for result checks 2019-04-12 10:16:49 +09:00
matview.c Fix tablespace inheritance for partitioned rels 2019-04-25 10:31:32 -04:00
opclasscmds.c Fix style violations in syscache lookups. 2019-05-05 13:10:07 -04:00
operatorcmds.c Fix style violations in syscache lookups. 2019-05-05 13:10:07 -04:00
policy.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
portalcmds.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
prepare.c Refactor ParamListInfo initialization 2019-03-14 13:30:09 +01:00
proclang.c Remove unnecessary use of PROCEDURAL 2019-02-25 08:38:59 +01:00
publicationcmds.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
schemacmds.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
seclabel.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
sequence.c tableam: relation creation, VACUUM FULL/CLUSTER, SET TABLESPACE. 2019-03-28 20:01:43 -07:00
statscmds.c Fix style violations in syscache lookups. 2019-05-05 13:10:07 -04:00
subscriptioncmds.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
tablecmds.c Clean up the behavior and API of catalog.c's is-catalog-relation tests. 2019-05-08 23:27:38 -04:00
tablespace.c Fix tablespace inheritance for partitioned rels 2019-04-25 10:31:32 -04:00
trigger.c Fix two memory leaks around force-storing tuples in slots. 2019-04-19 11:39:56 -07:00
tsearchcmds.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
typecmds.c Generated columns 2019-03-30 08:15:57 +01:00
user.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
vacuum.c Add TRUNCATE parameter to VACUUM. 2019-05-08 02:10:33 +09:00
variable.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
view.c Fix CREATE VIEW to allow zero-column views. 2019-02-17 12:37:31 -05:00