Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-12 Thread Peter Eisentraut
On 12.08.24 23:35, Alexander Korotkov wrote: On Fri, Aug 9, 2024 at 4:09 PM Peter Eisentraut wrote: On 08.08.24 01:15, Michael Paquier wrote:  On Aug 8, 2024, at 5:05, Alexander Korotkov wrote: On Wed, Aug 7, 2024 at 10:52 PM Peter Eisentraut wrote: It looks like the commit I'm talking a

pgsql: Rename C23 keyword

2024-08-12 Thread Peter Eisentraut
Rename C23 keyword constexpr is a keyword in C23. Rename a conflicting identifier for future-proofing. Reviewed-by: Robert Haas Discussion: https://www.postgresql.org/message-id/flat/08abc832-1384-4aca-a535-1a79765b565e%40eisentraut.org Branch -- master Details --- https://git.postgr

pgsql: libpq: Trace frontend authentication challenges

2024-08-12 Thread Alvaro Herrera
libpq: Trace frontend authentication challenges If tracing was enabled during connection startup, these messages would previously be listed in the trace output as something like this: F 54 Unknown message: 70 mismatched message length: consumed 4, expected 54 With this commit their ty

pgsql: Fix nls.mk to reflect astreamer files relocation

2024-08-12 Thread Alvaro Herrera
Fix nls.mk to reflect astreamer files relocation In the recent commit f80b09bac8, astreamer files were moved to another directory, but this change was not reflected in nls.mk. This commit corrects that oversight. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240806.102123.6481784

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-12 Thread Michael Paquier
> On Aug 13, 2024, at 6:35, Alexander Korotkov wrote:. > > As pointed by Noah Misch [1], unlike the commit the patch [2] also > changed segment-returning functions to return int64. Thus, in the > patch output formats make much more sense, because they match the > input data types. Michael, ar

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-12 Thread Alexander Korotkov
On Fri, Aug 9, 2024 at 4:09 PM Peter Eisentraut wrote: > On 08.08.24 01:15, Michael Paquier wrote: > >  > >> On Aug 8, 2024, at 5:05, Alexander Korotkov wrote: > >> On Wed, Aug 7, 2024 at 10:52 PM Peter Eisentraut > >> wrote: > >>> It looks like the commit I'm talking about here is a subset o

pgsql: Remove unnecessary check for NULL locale, per Coverity.

2024-08-12 Thread Jeff Davis
Remove unnecessary check for NULL locale, per Coverity. Discussion: https://postgr.es/m/3804933.1723394...@sss.pgh.pa.us Reported-by: Tom Lane Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a459ac504cc62421c08c9ee1ddc3e6f9be61f384 Modified Files -- src

pgsql: Give nbtree move right function internal linkage.

2024-08-12 Thread Peter Geoghegan
Give nbtree move right function internal linkage. Declare _bt_moveright() static. This is a minor modularity win; the routine was already private to nbtsearch.c for all practical purposes. Author: Matthias van de Meent Discussion: https://postgr.es/m/caeze2wgwvzcnexqb_op5mmzmdgj3fg3ahvm6bq2izp

pgsql: Log more info when wait-for-catchup tests time out.

2024-08-12 Thread Tom Lane
Log more info when wait-for-catchup tests time out. Cluster.pm's wait_for_catchup and allied subroutines don't provide enough information to diagnose the problem when a wait times out. In hopes of debugging some intermittent buildfarm failures, let's dump the ending state of the relevant system vi

pgsql: Log more info when wait-for-catchup tests time out.

2024-08-12 Thread Tom Lane
Log more info when wait-for-catchup tests time out. Cluster.pm's wait_for_catchup and allied subroutines don't provide enough information to diagnose the problem when a wait times out. In hopes of debugging some intermittent buildfarm failures, let's dump the ending state of the relevant system vi

pgsql: Add user-callable CRC functions.

2024-08-12 Thread Nathan Bossart
Add user-callable CRC functions. We've had code for CRC-32 and CRC-32C for some time (for WAL records, etc.), but there was no way for users to call it, despite apparent popular demand. The new crc32() and crc32c() functions accept bytea input and return bigint (to avoid returning negative values

pgsql: Fix outdated comments

2024-08-12 Thread David Rowley
Fix outdated comments A few fields in ResultRelInfo are now also used for MERGE. Update the comments to mention that. Reported-by: jian he Discussion: https://postgr.es/m/CACJufxH8-NvFhLcSZZTTW+1M9AfS4+SOTKmyPG7ZhzNvN=+n...@mail.gmail.com:wq Branch -- master Details --- https://git.p

pgsql: Fix a series of typos and outdated references

2024-08-12 Thread David Rowley
Fix a series of typos and outdated references Author: Alexander Lakhin Discussion: https://postgr.es/m/c1d63754-cb85-2d8a-8409-bde2c4d2d...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ffabb56c9460b8e2a3fffeea6263a61590ba006d Modified Files --

pgsql: Fix bad indentation introduced in commit f011e82c2c

2024-08-12 Thread Heikki Linnakangas
Fix bad indentation introduced in commit f011e82c2c Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8de5ca1dc9fa809102acd1983ee19159d0bc469f Modified Files -- src/backend/access/transam/xlogprefetcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

pgsql: Consolidate postmaster code to launch background processes

2024-08-12 Thread Heikki Linnakangas
Consolidate postmaster code to launch background processes Much of the code in process_pm_child_exit() to launch replacement processes when one exits or when progressing to next postmaster state was unnecessary, because the ServerLoop will launch any missing background processes anyway. Remove the

pgsql: Remove dead code

2024-08-12 Thread Peter Eisentraut
Remove dead code After e9931bfb751, the locale argument of SB_lower_char() is never NULL, so the branch that deals with NULL can be removed (similar to how e9931bfb751 for example removed those branches in str_tolower()). Reviewed-by: Jeff Davis Discussion: https://www.postgresql.org/message-id