pgsql: Fix check for PGHOST[ADDR] in pg_upgrade with Windows and tempor

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Fix check for PGHOST[ADDR] in pg_upgrade with Windows and tempor
Дата
Msg-id E1nPB8Z-000UyJ-RR@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix check for PGHOST[ADDR] in pg_upgrade with Windows and temporary paths

The checks currently done at the startup of pg_upgrade on PGHOST and
PGHOSTADDR to avoid any attempts to access to an external cluster fail
setting those parameters to Windows paths or even temporary paths
prefixed by an '@', as it only considers as a valid path strings
beginning with a slash.

As mentioned by Andres, is_unixsock_path() is designed to detect such
cases, so, like any other code paths dealing with the same problem (psql
and libpq), use it rather than assuming that all valid paths are
prefixed with just a slash.

This issue has been found while testing the TAP tests of pg_upgrade
through the CI on Windows.  This is a bug, but nobody has complained
about it since pg_upgrade exists so no backpatch is done, at least for
now.

Analyzed-by: Andres Freund, Michael Paquier
Discussion: https://postgr.es/m/YeYj4DU5qY/rtKXT@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dc57366c583685c4b2901f2ba69943f596b974ec

Modified Files
--------------
src/bin/pg_upgrade/server.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: psql: Additional tests
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: pgsql: Fix typo in pgbench messages.