pgsql: Move variable increment to the end of the loop

2022-12-19 Thread John Naylor
Move variable increment to the end of the loop This is less error prone and matches the placement of other code in the file. Justin Pryzby Reviewed by Tom Lane Discussion: https://www.postgresql.org/message-id/20221123172436.gj11...@telsasoft.com Branch -- master Details ---

pgsql: Add pg_dissect_walfile_name()

2022-12-19 Thread Michael Paquier
Add pg_dissect_walfile_name() This function takes in input a WAL segment name and returns a tuple made of the segment sequence number (dependent on the WAL segment size of the cluster) and its timeline, as of a thin SQL wrapper around the existing XLogFromFileName(). This function has multiple

pgsql: Remove hardcoded dependency to cryptohash type in the internals

2022-12-19 Thread Michael Paquier
Remove hardcoded dependency to cryptohash type in the internals of SCRAM SCRAM_KEY_LEN was a variable used in the internal routines of SCRAM to size a set of fixed-sized arrays used in the SHA and HMAC computations during the SASL exchange or when building a SCRAM password. This had a hard

pgsql: Fix comment that was missing a word.

2022-12-19 Thread Robert Haas
Fix comment that was missing a word. Ted Yu Discussion: http://postgr.es/m/CALte62wkFB05=RTWf7BL_6MfWs2=DY=ai-k7lwn_+0tjuup...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/eb60eb08a95eb531f3f2a459c1b623c5ac37ecd3 Modified Files --

pgsql: Fix typo in comment

2022-12-19 Thread Peter Eisentraut
Fix typo in comment Author: Ted Yu Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/af6284a666742d6932bae2e93f9eef156274a92e Modified Files -- src/bin/pg_dump/t/002_pg_dump.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Expose some information about backend subxact status.

2022-12-19 Thread Robert Haas
Expose some information about backend subxact status. A new function pg_stat_get_backend_subxact() can be used to get information about the number of subtransactions in the cache of a particular backend and whether that cache has overflowed. This can be useful for tracking down performance