pgsql: Fix buffer overrun in unicode string normalization with empty in

2021-11-10 Thread Michael Paquier
Fix buffer overrun in unicode string normalization with empty input PostgreSQL 13 and newer versions are directly impacted by that through the SQL function normalize(), which would cause a call of this function to write one byte past its allocation if using in input an empty string after recomposi

pgsql: Fix buffer overrun in unicode string normalization with empty in

2021-11-10 Thread Michael Paquier
Fix buffer overrun in unicode string normalization with empty input PostgreSQL 13 and newer versions are directly impacted by that through the SQL function normalize(), which would cause a call of this function to write one byte past its allocation if using in input an empty string after recomposi

pgsql: Fix buffer overrun in unicode string normalization with empty in

2021-11-10 Thread Michael Paquier
Fix buffer overrun in unicode string normalization with empty input PostgreSQL 13 and newer versions are directly impacted by that through the SQL function normalize(), which would cause a call of this function to write one byte past its allocation if using in input an empty string after recomposi

pgsql: Fix buffer overrun in unicode string normalization with empty in

2021-11-10 Thread Michael Paquier
Fix buffer overrun in unicode string normalization with empty input PostgreSQL 13 and newer versions are directly impacted by that through the SQL function normalize(), which would cause a call of this function to write one byte past its allocation if using in input an empty string after recomposi

pgsql: Fix buffer overrun in unicode string normalization with empty in

2021-11-10 Thread Michael Paquier
Fix buffer overrun in unicode string normalization with empty input PostgreSQL 13 and newer versions are directly impacted by that through the SQL function normalize(), which would cause a call of this function to write one byte past its allocation if using in input an empty string after recomposi

pgsql: Fix buffer overrun in unicode string normalization with empty in

2021-11-10 Thread Michael Paquier
Fix buffer overrun in unicode string normalization with empty input PostgreSQL 13 and newer versions are directly impacted by that through the SQL function normalize(), which would cause a call of this function to write one byte past its allocation if using in input an empty string after recomposi

pgsql: Clean up compilation warnings coming from PL/Perl with clang-12~

2021-11-10 Thread Michael Paquier
Clean up compilation warnings coming from PL/Perl with clang-12~ clang-12 has introduced -Wcompound-token-split-by-macro, that is causing a large amount of warnings when building PL/Perl because of its interactions with upstream Perl. This commit adds one -Wno to CFLAGS at ./configure time if the

pgsql: Clean up compilation warnings coming from PL/Perl with clang-12~

2021-11-10 Thread Michael Paquier
Clean up compilation warnings coming from PL/Perl with clang-12~ clang-12 has introduced -Wcompound-token-split-by-macro, that is causing a large amount of warnings when building PL/Perl because of its interactions with upstream Perl. This commit adds one -Wno to CFLAGS at ./configure time if the

pgsql: Clean up compilation warnings coming from PL/Perl with clang-12~

2021-11-10 Thread Michael Paquier
Clean up compilation warnings coming from PL/Perl with clang-12~ clang-12 has introduced -Wcompound-token-split-by-macro, that is causing a large amount of warnings when building PL/Perl because of its interactions with upstream Perl. This commit adds one -Wno to CFLAGS at ./configure time if the

pgsql: Clean up compilation warnings coming from PL/Perl with clang-12~

2021-11-10 Thread Michael Paquier
Clean up compilation warnings coming from PL/Perl with clang-12~ clang-12 has introduced -Wcompound-token-split-by-macro, that is causing a large amount of warnings when building PL/Perl because of its interactions with upstream Perl. This commit adds one -Wno to CFLAGS at ./configure time if the

pgsql: Clean up compilation warnings coming from PL/Perl with clang-12~

2021-11-10 Thread Michael Paquier
Clean up compilation warnings coming from PL/Perl with clang-12~ clang-12 has introduced -Wcompound-token-split-by-macro, that is causing a large amount of warnings when building PL/Perl because of its interactions with upstream Perl. This commit adds one -Wno to CFLAGS at ./configure time if the

pgsql: Clean up compilation warnings coming from PL/Perl with clang-12~

2021-11-10 Thread Michael Paquier
Clean up compilation warnings coming from PL/Perl with clang-12~ clang-12 has introduced -Wcompound-token-split-by-macro, that is causing a large amount of warnings when building PL/Perl because of its interactions with upstream Perl. This commit adds one -Wno to CFLAGS at ./configure time if the

pgsql: Doc: improve protocol spec for logical replication Type messages

2021-11-10 Thread Tom Lane
Doc: improve protocol spec for logical replication Type messages. protocol.sgml documented the layout for Type messages, but completely dropped the ball otherwise, failing to explain what they are, when they are sent, or what they're good for. While at it, do a little copy-editing on the descript

pgsql: Doc: improve protocol spec for logical replication Type messages

2021-11-10 Thread Tom Lane
Doc: improve protocol spec for logical replication Type messages. protocol.sgml documented the layout for Type messages, but completely dropped the ball otherwise, failing to explain what they are, when they are sent, or what they're good for. While at it, do a little copy-editing on the descript

pgsql: Doc: improve protocol spec for logical replication Type messages

2021-11-10 Thread Tom Lane
Doc: improve protocol spec for logical replication Type messages. protocol.sgml documented the layout for Type messages, but completely dropped the ball otherwise, failing to explain what they are, when they are sent, or what they're good for. While at it, do a little copy-editing on the descript

pgsql: Doc: improve protocol spec for logical replication Type messages

2021-11-10 Thread Tom Lane
Doc: improve protocol spec for logical replication Type messages. protocol.sgml documented the layout for Type messages, but completely dropped the ball otherwise, failing to explain what they are, when they are sent, or what they're good for. While at it, do a little copy-editing on the descript

pgsql: Doc: improve protocol spec for logical replication Type messages

2021-11-10 Thread Tom Lane
Doc: improve protocol spec for logical replication Type messages. protocol.sgml documented the layout for Type messages, but completely dropped the ball otherwise, failing to explain what they are, when they are sent, or what they're good for. While at it, do a little copy-editing on the descript

pgsql: Doc: improve protocol spec for logical replication Type messages

2021-11-10 Thread Tom Lane
Doc: improve protocol spec for logical replication Type messages. protocol.sgml documented the layout for Type messages, but completely dropped the ball otherwise, failing to explain what they are, when they are sent, or what they're good for. While at it, do a little copy-editing on the descript

Re: pgsql: Remove check for accept() argument types

2021-11-10 Thread Tom Lane
Peter Eisentraut writes: > Remove check for accept() argument types Early returns from the buildfarm are gaur | 2021-11-09 16:55:58 | auth.c:3235:17: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness gaur | 2021-11-09 16:55:58 | pqcomm.c:722:9

pgsql: Fix thinko in assertion in basebackup.c.

2021-11-10 Thread Robert Haas
Fix thinko in assertion in basebackup.c. Commit 5a1007a5088cd6ddf892f7422ea8dbaef362372f tried to introduce an assertion that the block size was at least twice the size of a tar block, but I got the math wrong. My error was reported to me off-list. Branch -- master Details --- https://gi

pgsql: More cleanup of 'ThisTimeLineID'.

2021-11-10 Thread Robert Haas
More cleanup of 'ThisTimeLineID'. In XLogCtlData, rename the structure member ThisTimeLineID to InsertTimeLineID and update the comments to make clear that it's only expected to be set after recovery is complete. In StartupXLOG, replace the local variables ThisTimeLineID and PrevTimeLineID with n