- Notifications
You must be signed in to change notification settings - Fork28
Commita9cf48a

Amit Kapila
Make COPY TO keep locks until the transaction end.
COPY TO released the ACCESS SHARE lock immediately when it was done ratherthan holding on to it until the end of the transaction.This breaks the case where a REPEATABLE READ transaction could see anempty table if it repeats a COPY statement and somebody truncated thetable in the meantime.Before4dded12 the lock was also released after COPY FROM, but thecommit 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 LaneReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/7bcfc39d4176faf85ab317d0c26786953646a411.camel@cybertec.at1 parent39e7bcb commita9cf48a
1 file changed
+1
-6
lines changedLines changed: 1 addition & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1081 | 1081 |
| |
1082 | 1082 |
| |
1083 | 1083 |
| |
1084 |
| - | |
1085 |
| - | |
1086 |
| - | |
1087 |
| - | |
1088 |
| - | |
1089 | 1084 |
| |
1090 |
| - | |
| 1085 | + | |
1091 | 1086 |
| |
1092 | 1087 |
| |
1093 | 1088 |
| |
|
0 commit comments
Comments
(0)