pgsql: Remove unnecessary unbind in LDAP search+bind mode

2023-07-08 Thread Peter Eisentraut
Remove unnecessary unbind in LDAP search+bind mode Comments in src/backend/libpq/auth.c say: (after successfully finding the final DN to check the user-supplied password against) /* Unbind and disconnect from the LDAP server */ and later /* * Need to re-initialize the LDAP connection, so that

pgsql: Rename port/thread.c to port/user.c.

2023-07-08 Thread Thomas Munro
Rename port/thread.c to port/user.c. Historically this module dealt with thread-safety of system interfaces, but now all that's left is wrapper code for user name and home directory lookup. Arguably the Windows variants of this logic could be moved in here too, to justify its presence under port.

pgsql: Remove obsolete comment and code from fe-auth.c.

2023-07-08 Thread Thomas Munro
Remove obsolete comment and code from fe-auth.c. We don't use getpwuid() anymore (see commit e757cdd6), so we don't need locking around pg_get_user_name(). Reviewed-by: Andres Freund Reviewed-by: Peter Eisentraut Reviewed-by: Heikki Linnakangas Discussion: https://postgr.es/m/CA%2BhUKGLtmexrp

pgsql: All supported systems have locale_t.

2023-07-08 Thread Thomas Munro
All supported systems have locale_t. locale_t is defined by POSIX.1-2008 and SUSv4, and available on all targeted systems. For Windows, win32_port.h redirects to a partial implementation called _locale_t. We can now remove a lot of compile-time tests for HAVE_LOCALE_T, and associated comments an

pgsql: Fix tmpdir issues with commit e213de8e78

2023-07-08 Thread Andrew Dunstan
Fix tmpdir issues with commit e213de8e78 Commit e213de8e78 fixed a problem with path lengths to a tempdir on Windows, but caused problems on at least some Unix systems where the system tempdir is on a different file system. To work around this, only used the system temdir for the destination of pg

pgsql: Fix tmpdir issues with commit e213de8e78

2023-07-08 Thread Andrew Dunstan
Fix tmpdir issues with commit e213de8e78 Commit e213de8e78 fixed a problem with path lengths to a tempdir on Windows, but caused problems on at least some Unix systems where the system tempdir is on a different file system. To work around this, only used the system temdir for the destination of pg

pgsql: Fix tmpdir issues with commit e213de8e78

2023-07-08 Thread Andrew Dunstan
Fix tmpdir issues with commit e213de8e78 Commit e213de8e78 fixed a problem with path lengths to a tempdir on Windows, but caused problems on at least some Unix systems where the system tempdir is on a different file system. To work around this, only used the system temdir for the destination of pg

pgsql: Fix tmpdir issues with commit e213de8e78

2023-07-08 Thread Andrew Dunstan
Fix tmpdir issues with commit e213de8e78 Commit e213de8e78 fixed a problem with path lengths to a tempdir on Windows, but caused problems on at least some Unix systems where the system tempdir is on a different file system. To work around this, only used the system temdir for the destination of pg

pgsql: Use shorter location for pg_replslot in pg_basebackup test

2023-07-08 Thread Andrew Dunstan
Use shorter location for pg_replslot in pg_basebackup test The symlink to a longer location tripped up some Windows limit on buildfarm animal fairywren when running with meson, which uses slightly longer paths. Backpatch to release 14 to keep the script in sync. Before that the script skipped all

pgsql: Use shorter location for pg_replslot in pg_basebackup test

2023-07-08 Thread Andrew Dunstan
Use shorter location for pg_replslot in pg_basebackup test The symlink to a longer location tripped up some Windows limit on buildfarm animal fairywren when running with meson, which uses slightly longer paths. Backpatch to all live branches to keep the script in sync. Branch -- REL_16_STABL

pgsql: Use shorter location for pg_replslot in pg_basebackup test

2023-07-08 Thread Andrew Dunstan
Use shorter location for pg_replslot in pg_basebackup test The symlink to a longer location tripped up some Windows limit on buildfarm animal fairywren when running with meson, which uses slightly longer paths. Backpatch to release 14 to keep the script in sync. Before that the script skipped all

pgsql: Use shorter location for pg_replslot in pg_basebackup test

2023-07-08 Thread Andrew Dunstan
Use shorter location for pg_replslot in pg_basebackup test The symlink to a longer location tripped up some Windows limit on buildfarm animal fairywren when running with meson, which uses slightly longer paths. Backpatch to release 14 to keep the script in sync. Before that the script skipped all

pgsql: Fix Perl warning

2023-07-08 Thread Peter Eisentraut
Fix Perl warning Use of uninitialized value $content in concatenation (.) or string Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6ee01e25b7f79bdf835d12927b306ad922c55fd3 Modified Files -- src/test/perl/PostgreSQL/Test/Utils.pm | 2 +- 1 file changed,

pgsql: Fix Perl warning

2023-07-08 Thread Peter Eisentraut
Fix Perl warning Use of uninitialized value $content in concatenation (.) or string Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1421e8f3b6fc489f66d665d2a657f1af8bcd6595 Modified Files -- src/test/perl/PostgreSQL/Test/Utils.pm | 2 +- 1 file ch

pgsql: Make some indentation in gram.y consistent

2023-07-08 Thread Peter Eisentraut
Make some indentation in gram.y consistent Reviewed-by: Amit Langote Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqE4XTdfb1nW=ojoy_tqsrhyt-q_kb6i5d4xckyrlc1...@mail.gmail.com Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/01f1f789df5631b831

pgsql: Make some indentation in gram.y consistent

2023-07-08 Thread Peter Eisentraut
Make some indentation in gram.y consistent Reviewed-by: Amit Langote Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqE4XTdfb1nW=ojoy_tqsrhyt-q_kb6i5d4xckyrlc1...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5edf438eeb00271cca5d19d0e