Hello, thanks for rapid answer!

On 25.11.2022 08:18, Michael Paquier wrote:
You are not using MSVC but MinGW, are you?  The buildfarm members with
TAP tests enabled are drongo, fairywren, bowerbord and jacana.  Even
though none of them are running the tests from
src/test/authentication/, this is running on a periodic basis in the
CI, where we are able to skip the test in MSVC already:
postgresql:authentication / authentication/003_peer SKIP 9.73s

There is MSVC on my PC. The project was build with
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30136 for x64

So yes, it is plausible that we are missing more safeguards here.

Your suggestion to skip under !$use_unix_sockets makes sense, as not
having unix sockets is not going to work for peer and WIN32 needs SSPI
to be secure with pg_regress.  Where is your test failing?  On the
first $node->psql('postgres') at the beginning of the test?  Just
wondering..

The test fails almost at the beginning in reset_pg_hba call after
modification pg_hba.conf and node reloading:
#t/003_peer.pl .. Dubious, test returned 2 (wstat 512, 0x200)
#No subtests run

Logs regress_log_003_peer and 003_peer_node.log are attached.

With best regards,

--
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
2022-11-25 09:55:49.731 MSK [7648] LOG:  starting PostgreSQL 16devel, compiled by Visual C++ build 1929, 64-bit
2022-11-25 09:55:49.735 MSK [7648] LOG:  listening on IPv4 address "127.0.0.1", port 60161
2022-11-25 09:55:49.773 MSK [2892] LOG:  database system was shut down at 2022-11-25 09:55:49 MSK
2022-11-25 09:55:49.800 MSK [7648] LOG:  database system is ready to accept connections
2022-11-25 09:55:49.890 MSK [7648] LOG:  received SIGHUP, reloading configuration files
2022-11-25 09:55:50.003 MSK [84] [unknown] LOG:  connection received: host=127.0.0.1 port=49822
2022-11-25 09:55:50.007 MSK [84] [unknown] FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "postgres", no encryption
2022-11-25 09:55:50.114 MSK [3356] [unknown] LOG:  connection received: host=127.0.0.1 port=49823
2022-11-25 09:55:50.117 MSK [3356] [unknown] FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "postgres", no encryption
2022-11-25 09:55:50.201 MSK [7648] LOG:  received immediate shutdown request
2022-11-25 09:55:50.212 MSK [7648] LOG:  database system is shut down
# Checking port 60161
# Found port 60161
Name: node
Data directory: 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/pgdata
Backup directory: 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/backup
Archive directory: 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/archives
Connection string: port=60161 host=127.0.0.1
Log file: 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/log/003_peer_node.log
# Running: initdb -D 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/pgdata
 -A trust -N
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "English_United 
States.1252".
The default database encoding has accordingly been set to "WIN1252".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory 
c:/projects/1c-master-7397/postgrespro/src/test/authentication/tmp_check/t_003_peer_node_data/pgdata
 ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... windows
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Europe/Moscow
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok

Sync to disk skipped.
The data directory might become corrupt if the operating system crashes.

Success. You can now start the database server using:

    pg_ctl -D 
^"c^:^/projects^/1c^-master^-7397^/postgrespro^/src^\test^\authentication^/tmp^_check^/t^_003^_peer^_node^_data^/pgdata^"
 -l logfile start

# Running: c:/projects/1c-master-7397/postgrespro/Release/pg_regress/pg_regress 
--config-auth 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/pgdata
### Starting node "node"
# Running: pg_ctl -w -D 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/pgdata
 -l 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/log/003_peer_node.log
 -o --cluster-name=node start
waiting for server to start.... done
server started
# Postmaster PID for node "node" is 7648
### Reloading node "node"
# Running: pg_ctl -D 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/pgdata
 reload
server signaled
psql: error: connection to server at "127.0.0.1", port 60161 failed: FATAL:  no 
pg_hba.conf entry for host "127.0.0.1", user "postgres", database "postgres", 
no encryption
connection error: 'psql: error: connection to server at "127.0.0.1", port 60161 
failed: FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "postgres", 
database "postgres", no encryption'
while running 'psql -XAtq -d port=60161 host=127.0.0.1 dbname='postgres' -f - 
-v ON_ERROR_STOP=1' at 
c:/projects/1c-master-7397/postgrespro/src/test/perl/PostgreSQL/Test/Cluster.pm 
line 1858.
### Stopping node "node" using mode immediate
# Running: pg_ctl -D 
c:/projects/1c-master-7397/postgrespro/src\test\authentication/tmp_check/t_003_peer_node_data/pgdata
 -m immediate stop
waiting for server to shut down.... done
server stopped
# No postmaster PID for node "node"

Reply via email to