pgsql: Spell "startup process" with lower case in the documentation

2022-02-14 Thread John Naylor
Spell "startup process" with lower case in the documentation Most uses were already lower case, so this just makes all user-visible spellings consistent. Bharath Rupireddy The proposed patch also had analagous changes for the code comments, but I decided that wasn't worth the churn. Discussion:

pgsql: Add test case for trailing junk after numeric literals

2022-02-14 Thread Peter Eisentraut
Add test case for trailing junk after numeric literals PostgreSQL currently accepts numeric literals with trailing non-digits, such as 123abc where the abc is treated as the next token. This may be a bit surprising. This commit adds test cases for this; subsequent commits intend to change this be

pgsql: Remove pg_atoi()

2022-02-14 Thread Peter Eisentraut
Remove pg_atoi() The last caller was int2vectorin(), and having such a general function for one user didn't seem useful, so just put the required parts inline and remove the function. Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883

pgsql: Add isolation test for errors during logical slot creation.

2022-02-14 Thread Andres Freund
Add isolation test for errors during logical slot creation. I didn't include this test in 2f6501fa3c5, because I was not sure the error messages for the terminated connection is stable across platforms. But it sounds like it is, and if not, we'd want to do something about the instability anyway...

pgsql: Remove command checks in tests of pg_basebackup and pg_receivewa

2022-02-14 Thread Michael Paquier
Remove command checks in tests of pg_basebackup and pg_receivewal The TAP tests of those commands have been checking if commands of "gzip" and "lz4" existed by launching them with an extra --version. Based on the buildfarm, this is not required for "gzip" as the command always exists. Since 1d08

pgsql: Fix thinko with subdirectories generated by pg_upgrade for inter

2022-02-14 Thread Michael Paquier
Fix thinko with subdirectories generated by pg_upgrade for internal files 38bfae3 has mixed the "dump/" and "log/" subdirectories generated in "pg_upgrade_output.d/", causing the internal dump files to be generated in "log/" and the log files to be in "dump/", but the opposite should be done. Thi

pgsql: Move replication slot release to before_shmem_exit().

2022-02-14 Thread Andres Freund
Move replication slot release to before_shmem_exit(). Previously, replication slots were released in ProcKill() on error, resulting in reporting replication slot drop of ephemeral slots after the stats subsystem was already shut down. To fix this problem, move replication slot release to a before

pgsql: Remove one use of pg_atoi()

2022-02-14 Thread Peter Eisentraut
Remove one use of pg_atoi() There was no real need to use this here instead of a simpler API. Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb...@enterprisedb.com Branch -- master Details --- https://git.postgresql.org/p

Re: pgsql: Track LLVM 15 changes.

2022-02-14 Thread Thomas Munro
On Tue, Feb 15, 2022 at 10:22 AM Alvaro Herrera wrote: > On 2022-Feb-15, Thomas Munro wrote: > > My general plan for this stuff is to try to do just one back-patch for > > each LLVM release, with all the changes in it, to reduce commit churn. > > Hence commit messages that say "Track LLVM X ..." s

Re: pgsql: Track LLVM 15 changes.

2022-02-14 Thread Alvaro Herrera
On 2022-Feb-15, Thomas Munro wrote: > My general plan for this stuff is to try to do just one back-patch for > each LLVM release, with all the changes in it, to reduce commit churn. > Hence commit messages that say "Track LLVM X ..." so that it's easy to > find all the changes for X around the tim

pgsql: Move scanint8() to numutils.c

2022-02-14 Thread Peter Eisentraut
Move scanint8() to numutils.c Move scanint8() to numutils.c and rename to pg_strtoint64(). We already have a "16" and "32" version of that, and the code inside the functions was aligned, so this move makes all three versions consistent. The API is also changed to no longer provide the errorOK ca

Re: pgsql: Track LLVM 15 changes.

2022-02-14 Thread Thomas Munro
On Tue, Feb 15, 2022 at 4:06 AM Fabien COELHO wrote: > > This isn't an API change, it's just a missing #include that we got away > > with before. Per buildfarm animal seawasp. > > If it is a somehow *missing* include, should it be back-patched? Not sure, > just asking. Arguably (I think it'd wor

Re: pgsql: Add test case for an archive recovery corner case.

2022-02-14 Thread Heikki Linnakangas
On 14/02/2022 16:41, Tom Lane wrote: Heikki Linnakangas writes: Add test case for an archive recovery corner case. hoverfly seems not to like this: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2022-02-14%2012%3A36%3A12 Hmm, only hoverfly - and even that succeeded on

Re: pgsql: Database-level collation version tracking

2022-02-14 Thread Peter Eisentraut
On 14.02.22 09:18, Michael Paquier wrote: calliphoridae does not like this one: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2022-02-14%2007%3A41%3A13 SELECT current_database() AS datname \\gset ALTER DATABASE :"datname" REFRESH COLLATION VERSION; -NOTICE: versio

pgsql: Suppress integer-overflow compiler warning for inconsistent sun_

2022-02-14 Thread Tom Lane
Suppress integer-overflow compiler warning for inconsistent sun_len. On AIX 7.1, struct sockaddr_un is declared to be 1025 bytes long, but the sun_len field that should hold the length is only a byte. Clamp the value we try to store to ensure it will fit in the field. (This coding might need adju

pgsql: Delete contrib/xml2's legacy implementation of xml_is_well_forme

2022-02-14 Thread Tom Lane
Delete contrib/xml2's legacy implementation of xml_is_well_formed(). This function is unreferenced in modern usage; it was superseded in 9.1 by a core function of the same name. It has been left in place in the C code only so that pre-9.1 SQL definitions of the contrib/xml2 functions would contin

Re: pgsql: Track LLVM 15 changes.

2022-02-14 Thread Fabien COELHO
Hello Thomas, This isn't an API change, it's just a missing #include that we got away with before. Per buildfarm animal seawasp. If it is a somehow *missing* include, should it be back-patched? Not sure, just asking. -- Fabien.

Re: pgsql: Add test case for an archive recovery corner case.

2022-02-14 Thread Tom Lane
Heikki Linnakangas writes: > Add test case for an archive recovery corner case. hoverfly seems not to like this: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2022-02-14%2012%3A36%3A12 # poll_query_until timed out executing this query: # SELECT '00020003' <

Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding

2022-02-14 Thread Tomas Vondra
On 2/14/22 14:36, Alvaro Herrera wrote: On 2022-Feb-13, Tomas Vondra wrote: Fixing the tests however uncovered a bug in the code, because sequence callbacks did not handle skip-empty-xacts properly. For trasactional increments we need to check/update the xact_wrote_changes flag, and emit the

Re: pgsql: Fix skip-empty-xacts with sequences in test_decoding

2022-02-14 Thread Alvaro Herrera
On 2022-Feb-13, Tomas Vondra wrote: > >> Fixing the tests however uncovered a bug in the code, because sequence > >> callbacks did not handle skip-empty-xacts properly. For trasactional > >> increments we need to check/update the xact_wrote_changes flag, and emit > >> the BEGIN if it's the first c

pgsql: Add test case for an archive recovery corner case.

2022-02-14 Thread Heikki Linnakangas
Add test case for an archive recovery corner case. While I was working on a patch to refactor things around xlog.c, I mixed up EndOfLogTLI and replayTLI at the end of recovery. As a result, if you recovered to a point with a lower-numbered timeline in a WAL segment that has a higher TLI in the fil

Re: pgsql: Database-level collation version tracking

2022-02-14 Thread Michael Paquier
On Mon, Feb 14, 2022 at 07:40:22AM +, Peter Eisentraut wrote: > Database-level collation version tracking > > This adds to database objects the same version tracking that collation > objects have. There is a new pg_database column datcollversion that > stores the version, a new function > pg_

pgsql: Add missing node support functions

2022-02-14 Thread Peter Eisentraut
Add missing node support functions forgotten in 37851a8b83d3d57ca48736093b10aa5f3bc0c177 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1383d52faa47190460b4dde63b69c944f2860b72 Modified Files -- src/backend/nodes/copyfuncs.c | 13 + src/bac