USE_BARRIER_SMGRRELEASE on Linux? - Mailing list pgsql-hackers

From Nathan Bossart
Subject USE_BARRIER_SMGRRELEASE on Linux?
Date
Msg-id 20220215235845.GA2665318@nathanxps13
Whole thread Raw
Responses Re: USE_BARRIER_SMGRRELEASE on Linux?
List 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



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Column Filtering in Logical Replication
Next
From: David Steele
Date:
Subject: Re: adding 'zstd' as a compression algorithm