Re: pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
On Thu, Nov 12, 2020 at 05:29:00PM -0300, Álvaro Herrera wrote: > On 2020-Nov-12, Bruce Momjian wrote: > > > doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h > > > > These files are in compiled directories and install directories. > > I think this patch is wrong, because in the ins

Re: pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Erik Rijkers
On 2020-11-12 21:29, Erik Rijkers wrote: On 2020-11-12 21:01, Bruce Momjian wrote: docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. This change contains: 'The regularly system' where probably was meant: 'The regu

Re: pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Erik Rijkers
On 2020-11-12 21:01, Bruce Momjian wrote: docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/[email protected]

Re: pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Alvaro Herrera
On 2020-Nov-12, Bruce Momjian wrote: > doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h > > These files are in compiled directories and install directories. I think this patch is wrong, because in the install tree the files are in the server/ subdir. It should read: The O

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h

2020-11-12 Thread Bruce Momjian
doc: clarify where to find pg_type_d.h (PG 11+) and pg_type.h These files are in compiled directories and install directories. Reported-by: [email protected] Discussion: https://postgr.es/m/[email protected] Backpatch-through: 9.5 Branc

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: docs: mention that expression indexes need analyze

2020-11-12 Thread Bruce Momjian
docs: mention that expression indexes need analyze Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=kpyhrpcd1...@mail.gmail.com Author: Nikolay Samokhvalov, modified

pgsql: doc: wire protocol data type for history file content is bytea

2020-11-12 Thread Bruce Momjian
doc: wire protocol data type for history file content is bytea Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6b

pgsql: doc: wire protocol data type for history file content is bytea

2020-11-12 Thread Bruce Momjian
doc: wire protocol data type for history file content is bytea Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6b

pgsql: doc: wire protocol data type for history file content is bytea

2020-11-12 Thread Bruce Momjian
doc: wire protocol data type for history file content is bytea Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6b

pgsql: doc: wire protocol data type for history file content is bytea

2020-11-12 Thread Bruce Momjian
doc: wire protocol data type for history file content is bytea Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6b

pgsql: doc: wire protocol data type for history file content is bytea

2020-11-12 Thread Bruce Momjian
doc: wire protocol data type for history file content is bytea Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6b

pgsql: doc: wire protocol data type for history file content is bytea

2020-11-12 Thread Bruce Momjian
doc: wire protocol data type for history file content is bytea Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6b

pgsql: change wire protocol data type for history file content

2020-11-12 Thread Bruce Momjian
change wire protocol data type for history file content This was marked as BYTEA, but is more like TEXT, which is how we already pass the history timeline file name. Internally, we don't do any encoding or bytea escape handling, but TEXT seems closest. This should cause no behavioral change. Re

pgsql: Remove tests that don't work on Windows.

2020-11-12 Thread Heikki Linnakangas
Remove tests that don't work on Windows. On Windows, a filename cannot contain backslashes, because a backslash is used directory separator. Remove tests I added in commit 9c4f5192f that tried to do that. We could perhaps use a SKIP block to only skip them on Windows, but I'm not sure how exactly

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: pg_trgm: fix crash in 2-item picksplit

2020-11-12 Thread Andrew Gierth
pg_trgm: fix crash in 2-item picksplit Whether from size overflow in gistSplit or from secondary splits, picksplit is (rarely) called with exactly two items to split. Formerly, due to special-case handling of the last item, this would lead to access to an uninitialized cache entry; prior to PG 13

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: Last-minute updates for release notes.

2020-11-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2020-25694, CVE-2020-25695, CVE-2020-25696 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0b59df670bd15065a87d1d9c216c3787839937fe Modified Files -- doc/src/sgml/release-12.sgml | 216

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: Last-minute updates for release notes.

2020-11-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2020-25694, CVE-2020-25695, CVE-2020-25696 Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b0529799960e910c4cf1e3d5509572dc8c653d67 Modified Files -- doc/src/sgml/release-10.sgml | 216

pgsql: Last-minute updates for release notes.

2020-11-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2020-25694, CVE-2020-25695, CVE-2020-25696 Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0425151233e018edfc03d2c3fe38f94ef3a67e77 Modified Files -- doc/src/sgml/release-9.6.sgml | 216 +++

pgsql: Last-minute updates for release notes.

2020-11-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2020-25694, CVE-2020-25695, CVE-2020-25696 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/90cf59c8c8c66c8b0b4c719b6f7ba8fce60b87e1 Modified Files -- doc/src/sgml/release-13.sgml | 216

pgsql: Ignore attempts to \gset into specially treated variables.

2020-11-12 Thread Noah Misch
Ignore attempts to \gset into specially treated variables. If an interactive psql session used \gset when querying a compromised server, the attacker could execute arbitrary code as the operating system account running psql. Using a prefix not found among specially treated variables, e.g. every l

pgsql: In security-restricted operations, block enqueue of at-commit us

2020-11-12 Thread Noah Misch
In security-restricted operations, block enqueue of at-commit user code. Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred triggers within index expressions and materialized view queries. An attacker having permission to create non-temp objects in at least one schema could ex

pgsql: Last-minute updates for release notes.

2020-11-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2020-25694, CVE-2020-25695, CVE-2020-25696 Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cb2fffe0d627d3437737ab5293c435b302f6bccf Modified Files -- doc/src/sgml/release-11.sgml | 216

pgsql: Last-minute updates for release notes.

2020-11-12 Thread Tom Lane
Last-minute updates for release notes. Security: CVE-2020-25694, CVE-2020-25695, CVE-2020-25696 Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d43ba1d84ccb74fd394c01ff23b033b26ab154c0 Modified Files -- doc/src/sgml/release-9.5.sgml | 216 +++

pgsql: Allow pg_rewind to use a standby server as the source system.

2020-11-12 Thread Heikki Linnakangas
Allow pg_rewind to use a standby server as the source system. Using a hot standby server as the source has not been possible, because pg_rewind creates a temporary table in the source system, to hold the list of file ranges that need to be fetched. Refactor it to queue up the file fetch requests i