pgsql: Tweak wording of documentation for pg_checksums

2019-04-07 Thread Michael Paquier
Tweak wording of documentation for pg_checksums Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e3865c37544d77bd4205dd5361592797b97d1e93 Modified Files -- doc/src/

pgsql: Reset memory context once per tuple in validateForeignKeyConstra

2019-04-07 Thread Andres Freund
Reset memory context once per tuple in validateForeignKeyConstraint. When using tableam ExecFetchSlotHeapTuple() might return a separately allocated tuple. We could use the shouldFree argument to explicitly free it, but it seems more robust to to protect Also add a CHECK_FOR_INTERRUPTS() after ea

pgsql: Fix a number of issues around modifying a previously updated row

2019-04-07 Thread Andres Freund
Fix a number of issues around modifying a previously updated row. This commit fixes three, unfortunately related, issues: 1) Since 5db6df0c01, the introduction of DML via tableam, it was possible to trigger "ERROR: unexpected table_lock_tuple status: 1" when updating a row that was previous

pgsql: Add more tests for partition tuple routing with dropped attribut

2019-04-07 Thread Michael Paquier
Add more tests for partition tuple routing with dropped attributes As bug #15733 has proved, we are lacking coverage for partition tuple routing with dropped attributes when involving three levels of partitioning or more. There was only an active bug in this area for v11, and HEAD is proving to h

pgsql: Fix partition tuple routing with dropped attributes

2019-04-07 Thread Michael Paquier
Fix partition tuple routing with dropped attributes When trying to insert a tuple into a partitioned table, the routing to the correct partition has been messed up by mixing when a tuple needs to be stored in an intermediate parent's slot and when a tuple needs to be converted because of attribute

pgsql: Avoid fetching past the end of the indoption array.

2019-04-07 Thread Tom Lane
Avoid fetching past the end of the indoption array. pg_get_indexdef_worker carelessly fetched indoption entries even for non-key index columns that don't have one. 99.999% of the time this would be harmless, since the code wouldn't examine the value ... but some fine day this will be a fetch off

pgsql: Avoid fetching past the end of the indoption array.

2019-04-07 Thread Tom Lane
Avoid fetching past the end of the indoption array. pg_get_indexdef_worker carelessly fetched indoption entries even for non-key index columns that don't have one. 99.999% of the time this would be harmless, since the code wouldn't examine the value ... but some fine day this will be a fetch off

pgsql: psql \dP: list partitioned tables and indexes

2019-04-07 Thread Alvaro Herrera
psql \dP: list partitioned tables and indexes The new command lists partitioned relations (tables and/or indexes), possibly with their sizes, possibly including partitioned partitions; their parents (if not top-level); if indexes show the tables they belong to; and their descriptions. While there

pgsql: Clean up side-effects of commits ab5fcf2b0 et al.

2019-04-07 Thread Tom Lane
Clean up side-effects of commits ab5fcf2b0 et al. Before those commits, partitioning-related code in the executor could assume that ModifyTableState.resultRelInfo[] contains only leaf partitions. However, now a fully-pruned update results in a dummy ModifyTable that references the root partitioned

pgsql: Clean up side-effects of commits ab5fcf2b0 et al.

2019-04-07 Thread Tom Lane
Clean up side-effects of commits ab5fcf2b0 et al. Before those commits, partitioning-related code in the executor could assume that ModifyTableState.resultRelInfo[] contains only leaf partitions. However, now a fully-pruned update results in a dummy ModifyTable that references the root partitioned

pgsql: Clean up side-effects of commits ab5fcf2b0 et al.

2019-04-07 Thread Tom Lane
Clean up side-effects of commits ab5fcf2b0 et al. Before those commits, partitioning-related code in the executor could assume that ModifyTableState.resultRelInfo[] contains only leaf partitions. However, now a fully-pruned update results in a dummy ModifyTable that references the root partitioned

pgsql: Report progress of REINDEX operations

2019-04-07 Thread Peter Eisentraut
Report progress of REINDEX operations This uses the same infrastructure that the CREATE INDEX progress reporting uses. Add a column to pg_stat_progress_create_index to report the OID of the index being worked on. This was not necessary for CREATE INDEX, but it's useful for REINDEX. Also edit th

pgsql: Cast pg_stat_progress_cluster.cluster_index_relid to oid

2019-04-07 Thread Peter Eisentraut
Cast pg_stat_progress_cluster.cluster_index_relid to oid It's tracked internally as bigint, but when presented to the user it should be oid. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/106f2eb664bbd38c83090becff9fcde1e9622c9c Modified Files -- doc/s