Fix the SharedFileSetUnregister API.
authorAmit Kapila <akapila@postgresql.org>
Tue, 1 Sep 2020 02:41:39 +0000 (08:11 +0530)
committerAmit Kapila <akapila@postgresql.org>
Tue, 1 Sep 2020 02:41:39 +0000 (08:11 +0530)
commit4ab77697f67aa5b90b032b9175b46901859da6d7
tree94bec8c0703eae0b770489d6156a22d752c3cd18
parentab3c6d41552411ea2fe4904ec8294951c52c113d
Fix the SharedFileSetUnregister API.

Commit 808e13b282 introduced a few APIs to extend the existing Buffile
interface. In SharedFileSetDeleteOnProcExit, it tries to delete the list
element while traversing the list with 'foreach' construct which makes the
behavior of list traversal unpredictable.

Author: Amit Kapila
Reviewed-by: Dilip Kumar
Tested-by: Dilip Kumar and Neha Sharma
Discussion: https://postgr.es/m/CAA4eK1JhLatVcQ2OvwA_3s0ih6Hx9+kZbq107cXVsSWWukH7vA@mail.gmail.com
src/backend/storage/file/sharedfileset.c