The following bug has been logged on the website:
Bug reference: 17731
Logged by: Egor Chindyaskin
Email address: kyzevan23@mail.ru
PostgreSQL version: 15.1
Operating system: Ubuntu 22.04
Description:
Hello, Alexander Lakhin and I have found certain conditions and a sequence
of actions under which the server does not start after it has been
abnormally stopped.
By running the following script on branch REL_15_STABLE, we get а
non-starting server:
for ((n=1;n<=10;n++)); do
(for ((i=1;i<=1000;i++)); do printf "CREATE UNLOGGED TABLE unlogged$i(f1
text);"; done | psql > psql$n.log 2>&1) &
done
sleep 1
killall -9 postgres
wait
pg_ctl -D "$PGDB" stop
pg_ctl -D "$PGDB" start
And we get the following log messages:
...
2022-12-26 12:23:02.146 +07 [14540] LOG: redo done at 0/1A35880 system
usage: CPU: user: 0.05 s, system: 0.02 s, elapsed: 0.08 s
2022-12-26 12:23:02.149 +07 [14540] FATAL: could not create file
"base/16384/18790": File exists
2022-12-26 12:23:02.151 +07 [14537] LOG: startup process (PID 14540) exited
with exit code 1
2022-12-26 12:23:02.151 +07 [14537] LOG: terminating any other active
server processes
2022-12-26 12:23:02.151 +07 [14537] LOG: shutting down due to startup
process failure
2022-12-26 12:23:02.153 +07 [14537] LOG: database system is shut down
stopped waiting
pg_ctl: could not start server