[==========] Running 3 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 3 tests from PostgresTest
[ RUN      ] PostgresTest.TestAddUser
WARNING: Logging before InitGoogleLogging() is written to STDERR
I20260812 08:03:45.521126 20772 mini_postgres.cc:62] Running initdb...
The files belonging to this database system will be owned by user "slave".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /tmp/dist-test-task11CrXf/test-tmp/mini_postgres-test.0.PostgresTest.TestAddUser.1786521825518733-20772-0/postgres ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /tmp/dist-test-task11CrXf/build/debug/bin/postgres/pg_ctl -D /tmp/dist-test-task11CrXf/test-tmp/mini_postgres-test.0.PostgresTest.TestAddUser.1786521825518733-20772-0/postgres -l logfile start

2026-08-12 08:03:47.947 UTC [20799] LOG:  starting PostgreSQL 17.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
2026-08-12 08:03:47.947 UTC [20799] LOG:  listening on IPv4 address "127.0.0.1", port 38475
2026-08-12 08:03:47.951 UTC [20799] LOG:  listening on Unix socket "/tmp/.s.PGSQL.38475"
2026-08-12 08:03:47.957 UTC [20805] LOG:  database system was shut down at 2026-08-12 08:03:46 UTC
2026-08-12 08:03:47.962 UTC [20799] LOG:  database system is ready to accept connections
I20260812 08:03:50.012373 20772 mini_postgres.cc:96] Postgres bound to 38475
2026-08-12 08:03:50.018 UTC [20814] FATAL:  database "slave" does not exist
127.0.0.1:38475 - accepting connections
2026-08-12 08:03:50.036 UTC [20799] LOG:  received smart shutdown request
2026-08-12 08:03:50.039 UTC [20799] LOG:  background worker "logical replication launcher" (PID 20810) exited with exit code 1
2026-08-12 08:03:50.039 UTC [20803] LOG:  shutting down
2026-08-12 08:03:50.040 UTC [20803] LOG:  checkpoint starting: shutdown immediate
2026-08-12 08:03:50.051 UTC [20803] LOG:  checkpoint complete: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.003 s, sync=0.004 s, total=0.013 s; sync files=6, longest=0.002 s, average=0.001 s; distance=3 kB, estimate=3 kB; lsn=0/147B630, redo lsn=0/147B630
2026-08-12 08:03:50.054 UTC [20799] LOG:  database system is shut down
[       OK ] PostgresTest.TestAddUser (4567 ms)
[ RUN      ] PostgresTest.TestCreateDatabaseNonExistentUser
I20260812 08:03:50.088251 20772 mini_postgres.cc:62] Running initdb...
The files belonging to this database system will be owned by user "slave".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /tmp/dist-test-task11CrXf/test-tmp/mini_postgres-test.0.PostgresTest.TestCreateDatabaseNonExistentUser.1786521825518733-20772-0/postgres ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /tmp/dist-test-task11CrXf/build/debug/bin/postgres/pg_ctl -D /tmp/dist-test-task11CrXf/test-tmp/mini_postgres-test.0.PostgresTest.TestCreateDatabaseNonExistentUser.1786521825518733-20772-0/postgres -l logfile start

2026-08-12 08:03:52.359 UTC [20843] LOG:  starting PostgreSQL 17.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
2026-08-12 08:03:52.359 UTC [20843] LOG:  listening on IPv4 address "127.0.0.1", port 40263
2026-08-12 08:03:52.362 UTC [20843] LOG:  listening on Unix socket "/tmp/.s.PGSQL.40263"
2026-08-12 08:03:52.367 UTC [20849] LOG:  database system was shut down at 2026-08-12 08:03:51 UTC
2026-08-12 08:03:52.371 UTC [20843] LOG:  database system is ready to accept connections
I20260812 08:03:54.357585 20772 mini_postgres.cc:96] Postgres bound to 40263
2026-08-12 08:03:54.362 UTC [20856] FATAL:  database "slave" does not exist
127.0.0.1:40263 - accepting connections
2026-08-12 08:03:54.379 UTC [20862] ERROR:  role "nonexistentuser" does not exist
2026-08-12 08:03:54.379 UTC [20862] STATEMENT:  CREATE DATABASE testdb OWNER nonexistentuser;
createdb: error: database creation failed: ERROR:  role "nonexistentuser" does not exist
2026-08-12 08:03:54.380 UTC [20843] LOG:  received smart shutdown request
2026-08-12 08:03:54.383 UTC [20843] LOG:  background worker "logical replication launcher" (PID 20852) exited with exit code 1
2026-08-12 08:03:54.383 UTC [20847] LOG:  shutting down
2026-08-12 08:03:54.385 UTC [20847] LOG:  checkpoint starting: shutdown immediate
2026-08-12 08:03:54.394 UTC [20847] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.003 s, sync=0.002 s, total=0.012 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/147A950, redo lsn=0/147A950
2026-08-12 08:03:54.397 UTC [20843] LOG:  database system is shut down
[       OK ] PostgresTest.TestCreateDatabaseNonExistentUser (4345 ms)
[ RUN      ] PostgresTest.TestCreateDatabaseExistingUserWithPersistence
I20260812 08:03:54.433415 20772 mini_postgres.cc:62] Running initdb...
The files belonging to this database system will be owned by user "slave".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /tmp/dist-test-task11CrXf/test-tmp/mini_postgres-test.0.PostgresTest.TestCreateDatabaseExistingUserWithPersistence.1786521825518733-20772-0/postgres ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /tmp/dist-test-task11CrXf/build/debug/bin/postgres/pg_ctl -D /tmp/dist-test-task11CrXf/test-tmp/mini_postgres-test.0.PostgresTest.TestCreateDatabaseExistingUserWithPersistence.1786521825518733-20772-0/postgres -l logfile start

2026-08-12 08:03:56.669 UTC [20884] LOG:  starting PostgreSQL 17.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
2026-08-12 08:03:56.669 UTC [20884] LOG:  listening on IPv4 address "127.0.0.1", port 44765
2026-08-12 08:03:56.672 UTC [20884] LOG:  listening on Unix socket "/tmp/.s.PGSQL.44765"
2026-08-12 08:03:56.677 UTC [20892] LOG:  database system was shut down at 2026-08-12 08:03:55 UTC
2026-08-12 08:03:56.681 UTC [20884] LOG:  database system is ready to accept connections
I20260812 08:03:58.649446 20772 mini_postgres.cc:96] Postgres bound to 44765
2026-08-12 08:03:58.654 UTC [20902] FATAL:  database "slave" does not exist
127.0.0.1:44765 - accepting connections
2026-08-12 08:03:58.736 UTC [20884] LOG:  received smart shutdown request
2026-08-12 08:03:58.738 UTC [20884] LOG:  background worker "logical replication launcher" (PID 20899) exited with exit code 1
2026-08-12 08:03:58.739 UTC [20890] LOG:  shutting down
2026-08-12 08:03:58.740 UTC [20890] LOG:  checkpoint starting: shutdown immediate
2026-08-12 08:03:59.078 UTC [20890] LOG:  checkpoint complete: wrote 901 buffers (5.5%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.015 s, sync=0.319 s, total=0.340 s; sync files=308, longest=0.004 s, average=0.002 s; distance=4013 kB, estimate=4013 kB; lsn=0/1865F80, redo lsn=0/1865F80
2026-08-12 08:03:59.083 UTC [20884] LOG:  database system is shut down
2026-08-12 08:03:59.112 UTC [20909] LOG:  starting PostgreSQL 17.2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
2026-08-12 08:03:59.112 UTC [20909] LOG:  listening on IPv4 address "127.0.0.1", port 44765
2026-08-12 08:03:59.115 UTC [20909] LOG:  listening on Unix socket "/tmp/.s.PGSQL.44765"
2026-08-12 08:03:59.120 UTC [20919] LOG:  database system was shut down at 2026-08-12 08:03:59 UTC
2026-08-12 08:03:59.124 UTC [20909] LOG:  database system is ready to accept connections
I20260812 08:04:01.090045 20772 mini_postgres.cc:96] Postgres bound to 44765
2026-08-12 08:04:01.095 UTC [20932] FATAL:  database "slave" does not exist
127.0.0.1:44765 - accepting connections
2026-08-12 08:04:01.173 UTC [20937] ERROR:  database "testdb1" already exists
2026-08-12 08:04:01.173 UTC [20937] STATEMENT:  CREATE DATABASE testdb1 OWNER testuser;
createdb: error: database creation failed: ERROR:  database "testdb1" already exists
2026-08-12 08:04:01.174 UTC [20909] LOG:  received smart shutdown request
2026-08-12 08:04:01.176 UTC [20909] LOG:  background worker "logical replication launcher" (PID 20929) exited with exit code 1
2026-08-12 08:04:01.177 UTC [20917] LOG:  shutting down
2026-08-12 08:04:01.178 UTC [20917] LOG:  checkpoint starting: shutdown immediate
2026-08-12 08:04:01.534 UTC [20917] LOG:  checkpoint complete: wrote 895 buffers (5.5%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.016 s, sync=0.336 s, total=0.357 s; sync files=304, longest=0.005 s, average=0.002 s; distance=4010 kB, estimate=4010 kB; lsn=0/1C50A90, redo lsn=0/1C50A90
2026-08-12 08:04:01.539 UTC [20909] LOG:  database system is shut down
[       OK ] PostgresTest.TestCreateDatabaseExistingUserWithPersistence (7165 ms)
[----------] 3 tests from PostgresTest (16078 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (16078 ms total)
[  PASSED  ] 3 tests.
