aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2020-05-15 08:10:00 +0530
committerAmit Kapila <akapila@postgresql.org>2020-05-15 08:10:00 +0530
commita9cf48a4cf0c878684a2f52a3a88e29399b2065e (patch)
tree14d4590e7e855243ed86ab4fb3b33eb0b7d16f26 /src/backend/access/transam/commit_ts.c
parent39e7bcbbff82e25441529349134bf41fc336169b (diff)
downloadpostgresql-a9cf48a4cf0c878684a2f52a3a88e29399b2065e.tar.gz
postgresql-a9cf48a4cf0c878684a2f52a3a88e29399b2065e.zip
Make COPY TO keep locks until the transaction end.
COPY TO released the ACCESS SHARE lock immediately when it was done rather than holding on to it until the end of the transaction. This breaks the case where a REPEATABLE READ transaction could see an empty table if it repeats a COPY statement and somebody truncated the table in the meantime. Before 4dded12faad the lock was also released after COPY FROM, but the commit failed to notice the irregularity in COPY TO. This is old behavior but doesn't seem important enough to backpatch. Author: Laurenz Albe, based on suggestion by Robert Haas and Tom Lane Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/7bcfc39d4176faf85ab317d0c26786953646a411.camel@cybertec.at
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions