Re: USE_BARRIER_SMGRRELEASE on Linux?
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-16T02:34:08Z
Lists: pgsql-hackers
On Wed, Feb 16, 2022 at 3:09 PM Thomas Munro <thomas.munro@gmail.com> wrote: > I tried adding another log line so I could see the unlink() happening, > but with that it doesn't fail (though I'm still trying). We may be in > heisenbug territory. This time I was luckier: https://api.cirrus-ci.com/v1/artifact/task/4915815005814784/log/src/test/regress/log/postmaster.log Interesting lines: 2022-02-16 02:08:50.933 UTC [14496][client backend] [pg_regress/tablespace][3/682:918] LOG: XXXX found 16748 2022-02-16 02:08:50.935 UTC [14089][checkpointer] LOG: checkpoint starting: immediate force wait 2022-02-16 02:08:50.937 UTC [14089][checkpointer] LOG: checkpoint complete: wrote 37 buffers (0.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.002 s; sync files=0, longest=0.000 s, average=0.000 s; distance=274 kB, estimate=7214 kB 2022-02-16 02:08:50.937 UTC [14496][client backend] [pg_regress/tablespace][3/682:918] LOG: XXXX found 16748 ... 2022-02-16 02:10:10.010 UTC [14089][checkpointer] LOG: shutting down 2022-02-16 02:10:10.010 UTC [14089][checkpointer] LOG: checkpoint starting: shutdown immediate ... 2022-02-16 02:10:10.080 UTC [14089][checkpointer] LOG: XXXX mdunlinkfiletag "pg_tblspc/16501/PG_15_202202141/16384/16748" So it's not getting unlinked until the *next* checkpoint cycle. I don't know why.
Commits
-
Fix race between DROP TABLESPACE and checkpointing.
- fe197872cfe8 10.21 landed
- ca522c60a5db 11.16 landed
- c918f07dd479 12.11 landed
- 51e760e5a667 13.7 landed
- 26e007939809 14.3 landed
- 46d9bfb0a68f 15.0 landed