Re: pgsql: Doc: Improve description around ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Justin Pryzby
Thanks for applying On Tue, Nov 05, 2019 at 01:19:41AM +, Michael Paquier wrote: > Doc: Improve description around ALTER TABLE ATTACH PARTITION > > This clarifies more how to use and how to take advantage of constraints > when attaching a new partition. > > Author: Justin Pryzby > Reviewed-b

pgsql: Doc: Clarify locks taken when using ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Michael Paquier
Doc: Clarify locks taken when using ALTER TABLE ATTACH PARTITION Since 898e5e32, this command uses partially ShareUpdateExclusiveLock, but the docs did not get the call. Author: Justin Pryzby Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20191028001207

pgsql: Doc: Clarify locks taken when using ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Michael Paquier
Doc: Clarify locks taken when using ALTER TABLE ATTACH PARTITION Since 898e5e32, this command uses partially ShareUpdateExclusiveLock, but the docs did not get the call. Author: Justin Pryzby Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20191028001207

pgsql: Doc: Improve description around ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Michael Paquier
Doc: Improve description around ALTER TABLE ATTACH PARTITION This clarifies more how to use and how to take advantage of constraints when attaching a new partition. Author: Justin Pryzby Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20191028001207.gb23

pgsql: Doc: Improve description around ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Michael Paquier
Doc: Improve description around ALTER TABLE ATTACH PARTITION This clarifies more how to use and how to take advantage of constraints when attaching a new partition. Author: Justin Pryzby Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20191028001207.gb23

pgsql: Doc: Improve description around ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Michael Paquier
Doc: Improve description around ALTER TABLE ATTACH PARTITION This clarifies more how to use and how to take advantage of constraints when attaching a new partition. Author: Justin Pryzby Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20191028001207.gb23

pgsql: Doc: Improve description around ALTER TABLE ATTACH PARTITION

2019-11-04 Thread Michael Paquier
Doc: Improve description around ALTER TABLE ATTACH PARTITION This clarifies more how to use and how to take advantage of constraints when attaching a new partition. Author: Justin Pryzby Reviewed-by: Amit Langote, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/20191028001207.gb23

pgsql: Refactor code building relation options

2019-11-04 Thread Michael Paquier
Refactor code building relation options Historically, the code to build relation options has been shaped the same way in multiple code paths by using a set of datums in input with the options parsed with a static table which is then filled with the option values. This introduces a new common rout

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Stabilize pg_dump output order for similarly-named triggers and

2019-11-04 Thread Tom Lane
Stabilize pg_dump output order for similarly-named triggers and policies. The code only compared two triggers' names and namespaces (the latter being the owning table's schema). This could result in falling back to an OID-based sort of similarly-named triggers on different tables. We prefer to av

pgsql: Fix ginEntryInsert's counting of GIN leaf tuples.

2019-11-04 Thread Tom Lane
Fix ginEntryInsert's counting of GIN leaf tuples. As the code stands, nEntries counts the number of ginEntryInsert() calls, so that's what you end up with at the end of a GIN index build. However, ginvacuumcleanup() recomputes nEntries as the number of surviving leaf tuples, and that's generally c

pgsql: Fix some compiler warnings on older compilers

2019-11-04 Thread Peter Eisentraut
Fix some compiler warnings on older compilers Some older compilers appear to not understand the recently introduced PG_FINALLY code structure that well in some circumstances and complain about possibly uninitialized variables. So to fix, initialize the variables explicitly in the cases complained

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and datum_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and rob

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and datum_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and rob

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and record_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and ro

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and record_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and ro

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and record_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and ro

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and record_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and ro

pgsql: Catch invalid typlens in a couple of places

2019-11-04 Thread Peter Eisentraut
Catch invalid typlens in a couple of places Rearrange the logic in record_image_cmp() and record_image_eq() to error out on unexpected typlens (either not supported there or completely invalid due to corruption). Barring corruption, this is not possible today but it seems more future-proof and ro