summaryrefslogtreecommitdiff
path: root/src/include/storage/md.h
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2022-05-07 16:19:42 +1200
committerThomas Munro <tmunro@postgresql.org>2022-05-07 16:32:10 +1200
commitb74e94dc27fdbb13954f230b1d1298430afa6c0c (patch)
treee67f872e3a7ce3cd62480978831c541529d36e45 /src/include/storage/md.h
parent701d918a426b394620ce4d046533f77262c70829 (diff)
downloadpostgresql-b74e94dc27fdbb13954f230b1d1298430afa6c0c.tar.gz
Rethink PROCSIGNAL_BARRIER_SMGRRELEASE.
With sufficiently bad luck, it was possible for IssuePendingWritebacks() to reopen a file after we'd processed PROCSIGNAL_BARRIER_SMGRRELEASE and before the file was unlinked by some other backend. That left a small hole in commit 4eb21763's plan to fix all spurious errors from DROP TABLESPACE and similar on Windows. Fix by closing md.c's segments, instead of just closing fd.c's descriptors, and then teaching smgrwriteback() not to open files that aren't already open. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/20220209220004.kb3dgtn2x2k2gtdm%40alap3.anarazel.de
Diffstat (limited to 'src/include/storage/md.h')
-rw-r--r--src/include/storage/md.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/include/storage/md.h b/src/include/storage/md.h
index 6e46d8d96a..ffffa40db7 100644
--- a/src/include/storage/md.h
+++ b/src/include/storage/md.h
@@ -23,7 +23,6 @@
extern void mdinit(void);
extern void mdopen(SMgrRelation reln);
extern void mdclose(SMgrRelation reln, ForkNumber forknum);
-extern void mdrelease(void);
extern void mdcreate(SMgrRelation reln, ForkNumber forknum, bool isRedo);
extern bool mdexists(SMgrRelation reln, ForkNumber forknum);
extern void mdunlink(RelFileNodeBackend rnode, ForkNumber forknum, bool isRedo);