Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes.

2021-02-11 Thread Andrey Borodin
> 12 февр. 2021 г., в 01:53, Peter Geoghegan написал(а): > > On Wed, Jan 13, 2021 at 12:36 AM Heikki Linnakangas > wrote: >> Add functions to 'pageinspect' to inspect GiST indexes. > > Is gist_page_items() robust with deleted pages? I think that it's > unsafe to assume that deleted pages will

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 9:00 AM Amit Kapila wrote: > > On Fri, Feb 12, 2021 at 8:47 AM Tom Lane wrote: > > > > Amit Kapila writes: > > > I noticed one failure: > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 > > > Checking the same. > > > > I

pgsql: Fix Subscription test added by commit ce0fdbfe97.

2021-02-11 Thread Amit Kapila
Fix Subscription test added by commit ce0fdbfe97. We want to test the variants of Alter Subscription that are not allowed in the transaction block but for that, we don't need to create a subscription that tries to connect to the publisher. As such, there is no problem with this test but it is good

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 8:47 AM Tom Lane wrote: > > Amit Kapila writes: > > I noticed one failure: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 > > Checking the same. > > I think thorntail runs with nondefault prevailing wal_level, might be >

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 8:23 AM Amit Kapila wrote: > > On Fri, Feb 12, 2021 at 7:50 AM Amit Kapila wrote: > > > > Allow multiple xacts during table sync in logical replication. > > > > I noticed one failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Tom Lane
Amit Kapila writes: > I noticed one failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 > Checking the same. I think thorntail runs with nondefault prevailing wal_level, might be related. regards, tom lane

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 7:50 AM Amit Kapila wrote: > > Allow multiple xacts during table sync in logical replication. > I noticed one failure: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 Checking the same. -- With Regards, Amit Kapila.

pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
Allow multiple xacts during table sync in logical replication. For the initial table data synchronization in logical replication, we use a single transaction to copy the entire table and then synchronize the position in the stream with the main apply worker. There are multiple downsides of this a

pgsql: Remove obsolete IndexBulkDeleteResult stats field.

2021-02-11 Thread Peter Geoghegan
Remove obsolete IndexBulkDeleteResult stats field. The pages_removed field is no longer used for anything. It hasn't been possible for an index to physically shrink since old-style VACUUM FULL was removed by commit 0a469c87. Branch -- master Details --- https://git.postgresql.org/pg/com

Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes.

2021-02-11 Thread Peter Geoghegan
On Wed, Jan 13, 2021 at 12:36 AM Heikki Linnakangas wrote: > Add functions to 'pageinspect' to inspect GiST indexes. Is gist_page_items() robust with deleted pages? I think that it's unsafe to assume that deleted pages will have index tuples, since the page contents will actually be a GISTDeleted

pgsql: Remove dead code in ECPGconnect(), and improve documentation.

2021-02-11 Thread Tom Lane
Remove dead code in ECPGconnect(), and improve documentation. The stanza in ECPGconnect() that intended to allow specification of a Unix socket directory path in place of a port has never executed since it was committed, nearly two decades ago; the preceding strrchr() already found the last colon

pgsql: Simplify jsonfuncs.c code by using strtoint() not strtol().

2021-02-11 Thread Tom Lane
Simplify jsonfuncs.c code by using strtoint() not strtol(). Explicitly testing for INT_MIN and INT_MAX isn't particularly good style; it's tedious and may draw useless compiler warnings on machines where int and long are the same width. We invented strtoint() precisely for this usage, so use that

pgsql: Remove no-longer-used RTE argument of markVarForSelectPriv().

2021-02-11 Thread Tom Lane
Remove no-longer-used RTE argument of markVarForSelectPriv(). In the wake of c028faf2a, this is no longer needed. I left it out of that patch since the API change would be undesirable in a released branch; but there's no reason not to do it in HEAD. Branch -- master Details --- https://

pgsql: Last-minute updates for release notes.

2021-02-11 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2021-3393, CVE-2021-20229 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/934b8508472a6b7175fd49bb2a8e719cb5560be8 Modified Files -- doc/src/sgml/release-11.sgml | 26 +-

pgsql: Last-minute updates for release notes.

2021-02-11 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2021-3393, CVE-2021-20229 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cd82d75a9861c871b95683afdb12df6374fa8435 Modified Files -- doc/src/sgml/release-13.sgml | 68 ++

pgsql: Last-minute updates for release notes.

2021-02-11 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2021-3393, CVE-2021-20229 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/392c530d10352978bb3701b7eb425626dc9a4d3e Modified Files -- doc/src/sgml/release-12.sgml | 26 +-

pgsql: Fix mishandling of column-level SELECT privileges for join alias

2021-02-11 Thread Tom Lane
Fix mishandling of column-level SELECT privileges for join aliases. scanNSItemForColumn, expandNSItemAttrs, and ExpandSingleTable would pass the wrong RTE to markVarForSelectPriv when dealing with a join ParseNamespaceItem: they'd pass the join RTE, when what we need to mark is the base table that

pgsql: Fix mishandling of column-level SELECT privileges for join alias

2021-02-11 Thread Tom Lane
Fix mishandling of column-level SELECT privileges for join aliases. scanNSItemForColumn, expandNSItemAttrs, and ExpandSingleTable would pass the wrong RTE to markVarForSelectPriv when dealing with a join ParseNamespaceItem: they'd pass the join RTE, when what we need to mark is the base table that

pgsql: Fix permission checks on constraint violation errors on partitio

2021-02-11 Thread Heikki Linnakangas
Fix permission checks on constraint violation errors on partitions. If a cross-partition UPDATE violates a constraint on the target partition, and the columns in the new partition are in different physical order than in the parent, the error message can reveal columns that the user does not have S

pgsql: Fix permission checks on constraint violation errors on partitio

2021-02-11 Thread Heikki Linnakangas
Fix permission checks on constraint violation errors on partitions. If a cross-partition UPDATE violates a constraint on the target partition, and the columns in the new partition are in different physical order than in the parent, the error message can reveal columns that the user does not have S

pgsql: Fix permission checks on constraint violation errors on partitio

2021-02-11 Thread Heikki Linnakangas
Fix permission checks on constraint violation errors on partitions. If a cross-partition UPDATE violates a constraint on the target partition, and the columns in the new partition are in different physical order than in the parent, the error message can reveal columns that the user does not have S

pgsql: Fix permission checks on constraint violation errors on partitio

2021-02-11 Thread Heikki Linnakangas
Fix permission checks on constraint violation errors on partitions. If a cross-partition UPDATE violates a constraint on the target partition, and the columns in the new partition are in different physical order than in the parent, the error message can reveal columns that the user does not have S

pgsql: Fix copy-paste error with SHA256 digest length in checksum_helpe

2021-02-11 Thread Michael Paquier
Fix copy-paste error with SHA256 digest length in checksum_helper.c Issue introduced by 87ae969, noticed while working on the area. While on it, fix some grammar in the surrounding static assertions. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/42d74e0c443760af9

pgsql: Add test case for abbrev(cidr)

2021-02-11 Thread Peter Eisentraut
Add test case for abbrev(cidr) This will in particular add some good test coverage for inet_cidr_ntop.c, which was previously completely uncovered. Reviewed-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/cb0c4662-4596-dab4-7f64-839c5e8582c8%40enterprisedb.com Branch --