pgsql: Rearrange dblink's dblink_build_sql_insert() and related routines

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rearrange dblink's dblink_build_sql_insert() and related routines
Date: 2010-06-14 20:50:11
Message-ID: 20100614205011.478027541D5@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call. The original coding
obtained and released lock several times per call. Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently. Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
pgsql/contrib/dblink:
dblink.c (r1.25.4.9 -> r1.25.4.10)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/dblink.c?r1=1.25.4.9&r2=1.25.4.10)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2010-06-15 02:08:01 pgsql: Properly define pg_upgrade global variable, per bug report from
Previous Message Tom Lane 2010-06-14 20:50:04 pgsql: Rearrange dblink's dblink_build_sql_insert() and related routines