pgsql: Don't call the function that may raise an error while holding sp

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't call the function that may raise an error while holding sp
Date: 2017-04-20 14:13:39
Message-ID: E1d1Cq3-0002uD-EV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8bbc618b4825b13a9776f2289acd06483e140300

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2017-04-20 14:36:17 pgsql: Mark some columns in pg_subscription as NOT NULL.
Previous Message Heikki Linnakangas 2017-04-19 18:47:05 pgsql: Fix typo in docs on SASL authentication.