pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Hold interrupts while running dsm_detach() callbacks. 6+ messages / 1 participants [nested] [flat]
* pgsql: Hold interrupts while running dsm_detach() callbacks. @ 2021-02-15 01:28 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2021-02-15 01:28 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Hold interrupts while running dsm_detach() callbacks. While cleaning up after a parallel query or parallel index creation that created temporary files, we could be interrupted by a statement timeout. The error handling path would then fail to clean up the files when it ran dsm_detach() again, because the callback was already popped off the list. Prevent this hazard by holding interrupts while the cleanup code runs. Thanks to Heikki Linnakangas for this suggestion, and also to Kyotaro Horiguchi, Masahiko Sawada, Justin Pryzby and Tom Lane for discussion of this and earlier ideas on how to fix the problem. Back-patch to all supported releases. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20191212180506.GR2082@telsasoft.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/637668fb1d17ad789e392a40ff09694ff1aabffb Modified Files -------------- src/backend/storage/ipc/dsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Hold interrupts while running dsm_detach() callbacks. @ 2021-02-15 01:29 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2021-02-15 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Hold interrupts while running dsm_detach() callbacks. While cleaning up after a parallel query or parallel index creation that created temporary files, we could be interrupted by a statement timeout. The error handling path would then fail to clean up the files when it ran dsm_detach() again, because the callback was already popped off the list. Prevent this hazard by holding interrupts while the cleanup code runs. Thanks to Heikki Linnakangas for this suggestion, and also to Kyotaro Horiguchi, Masahiko Sawada, Justin Pryzby and Tom Lane for discussion of this and earlier ideas on how to fix the problem. Back-patch to all supported releases. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20191212180506.GR2082@telsasoft.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9fe40913c45dcb78d3271fdc2dcf21ff15bee583 Modified Files -------------- src/backend/storage/ipc/dsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Hold interrupts while running dsm_detach() callbacks. @ 2021-02-15 01:29 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2021-02-15 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Hold interrupts while running dsm_detach() callbacks. While cleaning up after a parallel query or parallel index creation that created temporary files, we could be interrupted by a statement timeout. The error handling path would then fail to clean up the files when it ran dsm_detach() again, because the callback was already popped off the list. Prevent this hazard by holding interrupts while the cleanup code runs. Thanks to Heikki Linnakangas for this suggestion, and also to Kyotaro Horiguchi, Masahiko Sawada, Justin Pryzby and Tom Lane for discussion of this and earlier ideas on how to fix the problem. Back-patch to all supported releases. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20191212180506.GR2082@telsasoft.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/840eda04ebc99ce211ffd11946a59ad43c42bfa6 Modified Files -------------- src/backend/storage/ipc/dsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Hold interrupts while running dsm_detach() callbacks. @ 2021-02-15 01:29 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2021-02-15 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Hold interrupts while running dsm_detach() callbacks. While cleaning up after a parallel query or parallel index creation that created temporary files, we could be interrupted by a statement timeout. The error handling path would then fail to clean up the files when it ran dsm_detach() again, because the callback was already popped off the list. Prevent this hazard by holding interrupts while the cleanup code runs. Thanks to Heikki Linnakangas for this suggestion, and also to Kyotaro Horiguchi, Masahiko Sawada, Justin Pryzby and Tom Lane for discussion of this and earlier ideas on how to fix the problem. Back-patch to all supported releases. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20191212180506.GR2082@telsasoft.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/acafdd9ed5f05742730ee666abf49b89e8a125ad Modified Files -------------- src/backend/storage/ipc/dsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Hold interrupts while running dsm_detach() callbacks. @ 2021-02-15 01:29 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2021-02-15 01:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Hold interrupts while running dsm_detach() callbacks. While cleaning up after a parallel query or parallel index creation that created temporary files, we could be interrupted by a statement timeout. The error handling path would then fail to clean up the files when it ran dsm_detach() again, because the callback was already popped off the list. Prevent this hazard by holding interrupts while the cleanup code runs. Thanks to Heikki Linnakangas for this suggestion, and also to Kyotaro Horiguchi, Masahiko Sawada, Justin Pryzby and Tom Lane for discussion of this and earlier ideas on how to fix the problem. Back-patch to all supported releases. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20191212180506.GR2082@telsasoft.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4b426f77c3cf7fab24115ddb99174d1efa311aee Modified Files -------------- src/backend/storage/ipc/dsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Hold interrupts while running dsm_detach() callbacks. @ 2021-02-15 01:30 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2021-02-15 01:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Hold interrupts while running dsm_detach() callbacks. While cleaning up after a parallel query or parallel index creation that created temporary files, we could be interrupted by a statement timeout. The error handling path would then fail to clean up the files when it ran dsm_detach() again, because the callback was already popped off the list. Prevent this hazard by holding interrupts while the cleanup code runs. Thanks to Heikki Linnakangas for this suggestion, and also to Kyotaro Horiguchi, Masahiko Sawada, Justin Pryzby and Tom Lane for discussion of this and earlier ideas on how to fix the problem. Back-patch to all supported releases. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20191212180506.GR2082@telsasoft.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8a07e5bd82486b024e58417c09da193c275b13d3 Modified Files -------------- src/backend/storage/ipc/dsm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-02-15 01:30 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-02-15 01:28 pgsql: Hold interrupts while running dsm_detach() callbacks. Thomas Munro <tmunro@postgresql.org> 2021-02-15 01:29 pgsql: Hold interrupts while running dsm_detach() callbacks. Thomas Munro <tmunro@postgresql.org> 2021-02-15 01:29 pgsql: Hold interrupts while running dsm_detach() callbacks. Thomas Munro <tmunro@postgresql.org> 2021-02-15 01:29 pgsql: Hold interrupts while running dsm_detach() callbacks. Thomas Munro <tmunro@postgresql.org> 2021-02-15 01:29 pgsql: Hold interrupts while running dsm_detach() callbacks. Thomas Munro <tmunro@postgresql.org> 2021-02-15 01:30 pgsql: Hold interrupts while running dsm_detach() callbacks. Thomas Munro <tmunro@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox