BUG #17731: Server doesn't start after abnormal shutdown while creating unlogged tables

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: kyzevan23(at)mail(dot)ru
Subject: BUG #17731: Server doesn't start after abnormal shutdown while creating unlogged tables
Date: 2022-12-26 06:50:52
Message-ID: 17731-85ab9766c4257f8f@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17731
Logged by: Egor Chindyaskin
Email address: kyzevan23(at)mail(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-12-27 10:14:47 BUG #17732: pg_restore fails with check constraint
Previous Message David G. Johnston 2022-12-23 18:45:59 Re: BUG #17730: Trigger Issue