aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-10-23 18:36:13 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-10-23 18:36:13 -0400
commitc4016fcb1fd2a20ef589a3a616b59381256a985a (patch)
tree31d726aa890d25ee33201701ab9ee744109fa8a7 /src/backend/regex
parent5beb73b49598ff255c3d085d27d72bf28c8551b0 (diff)
downloadpostgresql-c4016fcb1fd2a20ef589a3a616b59381256a985a.tar.gz
postgresql-c4016fcb1fd2a20ef589a3a616b59381256a985a.zip
Don't throw serialization errors for self-conflicts in INSERT ON CONFLICT.
A transaction that conflicts against itself, for example INSERT INTO t(pk) VALUES (1),(1) ON CONFLICT DO NOTHING; should behave the same regardless of isolation level. It certainly shouldn't throw a serialization error, as retrying will not help. We got this wrong due to the ON CONFLICT logic not considering the case, as reported by Jason Dusek. Core of this patch is by Peter Geoghegan (based on an earlier patch by Thomas Munro), though I didn't take his proposed code refactoring for fear that it might have unexpected side-effects. Test cases by Thomas Munro and myself. Report: <CAO3NbwOycQjt2Oqy2VW-eLTq2M5uGMyHnGm=RNga4mjqcYD7gQ@mail.gmail.com> Related-Discussion: <57EE93C8.8080504@postgrespro.ru>
Diffstat (limited to 'src/backend/regex')
0 files changed, 0 insertions, 0 deletions