]> granicus.if.org Git - postgresql/commit
Don't call the function that may raise an error while holding spinlock.
authorFujii Masao <fujii@postgresql.org>
Thu, 20 Apr 2017 14:12:57 +0000 (23:12 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 20 Apr 2017 14:12:57 +0000 (23:12 +0900)
commit8bbc618b4825b13a9776f2289acd06483e140300
tree1765ae9ba5a7b00a8f593f50473a4920f467302a
parente68432a0e1ad07b6848fc9bbc11e382eb43b8618
Don't call the function that may raise an error while holding spinlock.

It's not safe to raise an error while holding spinlock. But previously
logical replication worker for table sync called the function which
reads the system catalog and may raise an error while it's holding
spinlock. Which could lead to the trouble where spinlock will never
be released and the server gets stuck infinitely.

Author: Petr Jelinek
Reviewed-by: Kyotaro Horiguchi and Fujii Masao
Reported-by: Fujii Masao
Discussion: http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=ZOSY3kX_Pna9R9SA@mail.gmail.com
src/backend/replication/logical/tablesync.c