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.