USE_BARRIER_SMGRRELEASE on Linux?

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: USE_BARRIER_SMGRRELEASE on Linux?
Date: 2022-02-15 23:58:45
Message-ID: 20220215235845.GA2665318@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've noticed that my WAL pre-allocation patches [0] routinely fail with
"tablespace is not empty" errors on Linux [1]:

DROP TABLESPACE regress_tblspace_renamed;
+ERROR: tablespace "regress_tblspace_renamed" is not empty

This appears to have been discussed elsewhere (and fixed) for Windows [2]
[3] [4]. However, I'm able to reliably reproduce the issue on Linux when
the WAL pre-allocation patches are applied. Adding a short sleep before
dropping the tablespace or defining USE_BARRIER_SMGRRELEASE seems to clear
up the issue.

My current thinking is that the performance boost from pre-allocating WAL
is revealing this issue, but I'm not 100% certain it's not due to a bug in
my code. I'm continuing to investigate.

[0] https://commitfest.postgresql.org/37/3158/
[1] https://api.cirrus-ci.com/v1/artifact/task/4678319084929024/log/src/test/regress/regression.diffs
[2] https://postgr.es/m/CA%2BhUKGJp-m8uAD_wS7%2BdkTgif013SNBSoJujWxvRUzZ1nkoUyA%40mail.gmail.com
[3] https://postgr.es/m/CA%2BhUKGLdemy2gBm80kz20GTe6hNVwoErE8KwcJk6-U56oStjtg%40mail.gmail.com
[4] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4eb2176

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2022-02-16 00:09:07 Re: adding 'zstd' as a compression algorithm
Previous Message Tomas Vondra 2022-02-15 23:57:31 Re: Column Filtering in Logical Replication