postgresql/src/backend/commands
Robert Haas 2f17844104 Allow UPDATE to move rows between partitions.
When an UPDATE causes a row to no longer match the partition
constraint, try to move it to a different partition where it does
match the partition constraint.  In essence, the UPDATE is split into
a DELETE from the old partition and an INSERT into the new one.  This
can lead to surprising behavior in concurrency scenarios because
EvalPlanQual rechecks won't work as they normally did; the known
problems are documented.  (There is a pending patch to improve the
situation further, but it needs more review.)

Amit Khandekar, reviewed and tested by Amit Langote, David Rowley,
Rajkumar Raghuwanshi, Dilip Kumar, Amul Sul, Thomas Munro, Álvaro
Herrera, Amit Kapila, and me.  A few final revisions by me.

Discussion: http://postgr.es/m/CAJ3gD9do9o2ccQ7j7+tSgiE1REY65XRiMb=yJO3u3QhyP8EEPQ@mail.gmail.com
2018-01-19 15:33:06 -05:00
..
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
aggregatecmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
alter.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
amcmds.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
analyze.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
async.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
cluster.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
collationcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
comment.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
constraint.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
conversioncmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
copy.c Allow UPDATE to move rows between partitions. 2018-01-19 15:33:06 -05:00
createas.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
dbcommands.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
define.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
discard.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
dropcmds.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
event_trigger.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
explain.c Add QueryEnvironment to ExplainOneQuery_hook's parameter list. 2018-01-11 12:16:18 -05:00
extension.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
foreigncmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
functioncmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
indexcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
lockcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
matview.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
opclasscmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
operatorcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
policy.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
portalcmds.c Remove PortalGetQueryDesc() 2018-01-09 13:47:56 -05:00
prepare.c Update portal-related memory context names and API 2018-01-09 13:47:56 -05:00
proclang.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
publicationcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
schemacmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
seclabel.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
sequence.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
statscmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
subscriptioncmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
tablecmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
tablespace.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
trigger.c Allow UPDATE to move rows between partitions. 2018-01-19 15:33:06 -05:00
tsearchcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
typecmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
user.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
vacuum.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
vacuumlazy.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
variable.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
view.c Update copyright for 2018 2018-01-02 23:30:12 -05:00