diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-06-14 20:49:57 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-06-14 20:49:57 +0000 |
commit | c797279ab7933e15078199fc35bf999a5ab5741f (patch) | |
tree | 2132d8a34f75edf94f2b1e06a0a00855fa19d052 /src | |
parent | 47cf87a147478818d33ff24a7484a09f8c8d5e96 (diff) | |
download | postgresql-c797279ab7933e15078199fc35bf999a5ab5741f.tar.gz postgresql-c797279ab7933e15078199fc35bf999a5ab5741f.zip |
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.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions