Re: pgsql: Check that we have a working tar before trying to use it

2021-12-13 Thread Michael Paquier
On Thu, Dec 09, 2021 at 09:05:21AM -0500, Andrew Dunstan wrote: > That's odd. What edition of Windows 10 do you have? If it's not Pro I > could understand it. I just checked and every Windows 10 machine I have > here has it - and some of them are quite old. Digging into that, I cannot find an exac

pgsql: Fix alignment in multirange_get_range() function

2021-12-13 Thread Alexander Korotkov
Fix alignment in multirange_get_range() function The multirange_get_range() function fails when two boundaries of the same range have different alignments. Fix that by adding proper pointer alignment. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/17300-dced2d01ddeb1f2f%40postgres

pgsql: Fix alignment in multirange_get_range() function

2021-12-13 Thread Alexander Korotkov
Fix alignment in multirange_get_range() function The multirange_get_range() function fails when two boundaries of the same range have different alignments. Fix that by adding proper pointer alignment. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/17300-dced2d01ddeb1f2f%40postgres

pgsql: Default to log_checkpoints=on, log_autovacuum_min_duration=10m

2021-12-13 Thread Robert Haas
Default to log_checkpoints=on, log_autovacuum_min_duration=10m The idea here is that when a performance problem is known to have occurred at a certain point in time, it's a good thing if there is some information available from the logs to help figure out what might have happened around that time.

pgsql: Remove InitXLOGAccess().

2021-12-13 Thread Robert Haas
Remove InitXLOGAccess(). It's not great that RecoveryInProgress() calls InitXLOGAccess(), because a status inquiry function typically shouldn't have the side effect of performing initializations. We could fix that by calling InitXLOGAccess() from some other place, but instead, let's remove it alto

pgsql: Suppress -Wformat-overflow warnings in 9.2's xml.c.

2021-12-13 Thread Tom Lane
Suppress -Wformat-overflow warnings in 9.2's xml.c. If not using --with-libxml, late-model gcc complains about "'%s' directive argument is null" in places where xml.c passes the result of map_sql_identifier_to_xml_name() to %s. That's not so surprising, because without USE_LIBXML the body of that

Re: pgsql: Check that we have a working tar before trying to use it

2021-12-13 Thread Andrew Dunstan
On 12/13/21 03:08, Michael Paquier wrote: > Also, > the default values of LZ4, TAR and GZIP_PROGRAM had better be set > *before* loading buildenv.pl, and not after it is loaded, no? On > HEAD, one has no way to unset any of those variables so it is not > possible to skip things if an environment

pgsql: Suppress -Warray-bounds warning in 9.2's xlog.c.

2021-12-13 Thread Tom Lane
Suppress -Warray-bounds warning in 9.2's xlog.c. Late-model gcc delivers a confusing warning "'memcpy' offset [0, 63] is out of the bounds [0, 0]" here, which turns out to be because it thinks the "record" pointer might be NULL, which again is because it doesn't know ereport(PANIC) won't return.

Re: pgsql: Check that we have a working tar before trying to use it

2021-12-13 Thread Andrew Dunstan
On 12/13/21 11:47, Andrew Dunstan wrote: > On 12/13/21 03:08, Michael Paquier wrote: >> Also, >> the default values of LZ4, TAR and GZIP_PROGRAM had better be set >> *before* loading buildenv.pl, and not after it is loaded, no? On >> HEAD, one has no way to unset any of those variables so it is

pgsql: Make PG_TEST_USE_UNIX_SOCKETS work for tap tests on windows.

2021-12-13 Thread Andres Freund
Make PG_TEST_USE_UNIX_SOCKETS work for tap tests on windows. We need to replace windows-style \ path separators with / when putting socket directories either in postgresql.conf or libpq connection strings, otherwise they are interpreted as escapes. Author: Andres Freund Reviewed-By: Peter Eisent

pgsql: backpatch "Set application_name per-test in isolation and ecpg t

2021-12-13 Thread Andres Freund
backpatch "Set application_name per-test in isolation and ecpg tests." We started to backpatch test infrastructure improvements more aggressively to make it easier to backpatch test. A proposed isolationtester improvement has a dependency on b1907d688, backpatch b1907d688 to make it easier to subs

pgsql: backpatch "Set application_name per-test in isolation and ecpg t

2021-12-13 Thread Andres Freund
backpatch "Set application_name per-test in isolation and ecpg tests." We started to backpatch test infrastructure improvements more aggressively to make it easier to backpatch test. A proposed isolationtester improvement has a dependency on b1907d688, backpatch b1907d688 to make it easier to subs

pgsql: backpatch "Set application_name per-test in isolation and ecpg t

2021-12-13 Thread Andres Freund
backpatch "Set application_name per-test in isolation and ecpg tests." We started to backpatch test infrastructure improvements more aggressively to make it easier to backpatch test. A proposed isolationtester improvement has a dependency on b1907d688, backpatch b1907d688 to make it easier to subs

pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
isolationtester: append session name to application_name. When writing / debugging an isolation test it sometimes is useful to see which session holds what lock etc. To make it easier, both as part of spec files and interactively, append the session name to application_name. Since b1907d688 applic

pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
isolationtester: append session name to application_name. When writing / debugging an isolation test it sometimes is useful to see which session holds what lock etc. To make it easier, both as part of spec files and interactively, append the session name to application_name. Since b1907d688 applic

pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
isolationtester: append session name to application_name. When writing / debugging an isolation test it sometimes is useful to see which session holds what lock etc. To make it easier, both as part of spec files and interactively, append the session name to application_name. Since b1907d688 applic

pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
isolationtester: append session name to application_name. When writing / debugging an isolation test it sometimes is useful to see which session holds what lock etc. To make it easier, both as part of spec files and interactively, append the session name to application_name. Since b1907d688 applic

pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
isolationtester: append session name to application_name. When writing / debugging an isolation test it sometimes is useful to see which session holds what lock etc. To make it easier, both as part of spec files and interactively, append the session name to application_name. Since b1907d688 applic

pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
isolationtester: append session name to application_name. When writing / debugging an isolation test it sometimes is useful to see which session holds what lock etc. To make it easier, both as part of spec files and interactively, append the session name to application_name. Since b1907d688 applic

pgsql: Implement poly_distance().

2021-12-13 Thread Tom Lane
Implement poly_distance(). geo_ops.c contains half a dozen functions that are just stubs throwing ERRCODE_FEATURE_NOT_SUPPORTED. Since it's been like that for more than twenty years, there's clearly not a lot of interest in filling in the stubs. However, I'm uncomfortable with deleting poly_dist

pgsql: Doc: de-document unimplemented geometric operators.

2021-12-13 Thread Tom Lane
Doc: de-document unimplemented geometric operators. In commit 791090bd7, I made an effort to fill in documentation for all geometric operators listed in pg_operator. However, it now appears that at least some of the omissions may have been intentional, because some of those operator entries point

pgsql: Doc: de-document unimplemented geometric operators.

2021-12-13 Thread Tom Lane
Doc: de-document unimplemented geometric operators. In commit 791090bd7, I made an effort to fill in documentation for all geometric operators listed in pg_operator. However, it now appears that at least some of the omissions may have been intentional, because some of those operator entries point

pgsql: Doc: de-document unimplemented geometric operators.

2021-12-13 Thread Tom Lane
Doc: de-document unimplemented geometric operators. In commit 791090bd7, I made an effort to fill in documentation for all geometric operators listed in pg_operator. However, it now appears that at least some of the omissions may have been intentional, because some of those operator entries point

pgsql: Remove unimplemented/undocumented geometric functions & operator

2021-12-13 Thread Tom Lane
Remove unimplemented/undocumented geometric functions & operators. Nobody has filled in these stubs for upwards of twenty years, so it's time to drop the idea that they might get implemented any day now. The associated pg_operator and pg_proc entries are just confusing wastes of space. Per compl

Re: pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Andres Freund
Hi, On 2021-12-13 20:06:10 +, Andres Freund wrote: > isolationtester: append session name to application_name. > > When writing / debugging an isolation test it sometimes is useful to see which > session holds what lock etc. To make it easier, both as part of spec files and > interactively, a

pgsql: Remove assertion for replication origins in PREPARE TRANSACTION

2021-12-13 Thread Michael Paquier
Remove assertion for replication origins in PREPARE TRANSACTION When using replication origins, pg_replication_origin_xact_setup() is an optional choice to be able to set a LSN and a timestamp to mark the origin, which would be additionally added to WAL for transaction commits or aborts (including

pgsql: Remove assertion for replication origins in PREPARE TRANSACTION

2021-12-13 Thread Michael Paquier
Remove assertion for replication origins in PREPARE TRANSACTION When using replication origins, pg_replication_origin_xact_setup() is an optional choice to be able to set a LSN and a timestamp to mark the origin, which would be additionally added to WAL for transaction commits or aborts (including

pgsql: Remove assertion for replication origins in PREPARE TRANSACTION

2021-12-13 Thread Michael Paquier
Remove assertion for replication origins in PREPARE TRANSACTION When using replication origins, pg_replication_origin_xact_setup() is an optional choice to be able to set a LSN and a timestamp to mark the origin, which would be additionally added to WAL for transaction commits or aborts (including

pgsql: Remove assertion for replication origins in PREPARE TRANSACTION

2021-12-13 Thread Michael Paquier
Remove assertion for replication origins in PREPARE TRANSACTION When using replication origins, pg_replication_origin_xact_setup() is an optional choice to be able to set a LSN and a timestamp to mark the origin, which would be additionally added to WAL for transaction commits or aborts (including

pgsql: Remove assertion for replication origins in PREPARE TRANSACTION

2021-12-13 Thread Michael Paquier
Remove assertion for replication origins in PREPARE TRANSACTION When using replication origins, pg_replication_origin_xact_setup() is an optional choice to be able to set a LSN and a timestamp to mark the origin, which would be additionally added to WAL for transaction commits or aborts (including

Re: pgsql: isolationtester: append session name to application_name.

2021-12-13 Thread Michael Paquier
On Mon, Dec 13, 2021 at 05:49:49PM -0800, Andres Freund wrote: > Eeelpout failed 020_archive_status.pl with > error running SQL: 'psql::1: ERROR: checkpoint request failed > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=eelpout&dt=021-12-13%2020%3A16%3A06 > after this and the preceding c

Re: pgsql: Check that we have a working tar before trying to use it

2021-12-13 Thread Michael Paquier
On Mon, Dec 13, 2021 at 11:47:36AM -0500, Andrew Dunstan wrote: > No. The code only sets them if they have not been previously set by > buildenv.pl or the calling environment. That's what "||=" means. Well, using ||= after the fact means that it is not possible to delete any of those environment v