mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +03:00
Revert MERGE patch
This reverts commitsd204ef6377
,83454e3c2b
and a few more commits thereafter (complete list at the end) related to MERGE feature. While the feature was fully functional, with sufficient test coverage and necessary documentation, it was felt that some parts of the executor and parse-analyzer can use a different design and it wasn't possible to do that in the available time. So it was decided to revert the patch for PG11 and retry again in the future. Thanks again to all reviewers and bug reporters. List of commits reverted, in reverse chronological order:f1464c5380
Improve parse representation for MERGEddb4158579
MERGE syntax diagram correction530e69e59b
Allow cpluspluscheck to pass by renaming variable01b88b4df5
MERGE minor errata3af7b2b0d4
MERGE fix variable warning in non-assert buildsa5d86181ec
MERGE INSERT allows only one VALUES clause4b2d44031f
MERGE post-commit review4923550c20
Tab completion for MERGEaa3faa3c7a
WITH support in MERGE83454e3c2b
New files for MERGEd204ef6377
MERGE SQL Command following SQL:2016 Author: Pavan Deolasee Reviewed-by: Michael Paquier
This commit is contained in:
@@ -53,34 +53,23 @@ typedef enum LockTupleMode
|
||||
* When heap_update, heap_delete, or heap_lock_tuple fail because the target
|
||||
* tuple is already outdated, they fill in this struct to provide information
|
||||
* to the caller about what happened.
|
||||
*
|
||||
* result is the result of HeapTupleSatisfiesUpdate, leading to the failure.
|
||||
* It's set to HeapTupleMayBeUpdated when there is no failure.
|
||||
*
|
||||
* ctid is the target's ctid link: it is the same as the target's TID if the
|
||||
* target was deleted, or the location of the replacement tuple if the target
|
||||
* was updated.
|
||||
*
|
||||
* xmax is the outdating transaction's XID. If the caller wants to visit the
|
||||
* replacement tuple, it must check that this matches before believing the
|
||||
* replacement is really a match.
|
||||
*
|
||||
* cmax is the outdating command's CID, but only when the failure code is
|
||||
* HeapTupleSelfUpdated (i.e., something in the current transaction outdated
|
||||
* the tuple); otherwise cmax is zero. (We make this restriction because
|
||||
* HeapTupleHeaderGetCmax doesn't work for tuples outdated in other
|
||||
* transactions.)
|
||||
*
|
||||
* lockmode is only relevant for callers of heap_update() and is the mode which
|
||||
* the caller should use in case it needs to lock the updated tuple.
|
||||
*/
|
||||
typedef struct HeapUpdateFailureData
|
||||
{
|
||||
HTSU_Result result;
|
||||
ItemPointerData ctid;
|
||||
TransactionId xmax;
|
||||
CommandId cmax;
|
||||
LockTupleMode lockmode;
|
||||
} HeapUpdateFailureData;
|
||||
|
||||
|
||||
@@ -173,7 +162,7 @@ extern void heap_abort_speculative(Relation relation, HeapTuple tuple);
|
||||
extern HTSU_Result heap_update(Relation relation, ItemPointer otid,
|
||||
HeapTuple newtup,
|
||||
CommandId cid, Snapshot crosscheck, bool wait,
|
||||
HeapUpdateFailureData *hufd);
|
||||
HeapUpdateFailureData *hufd, LockTupleMode *lockmode);
|
||||
extern HTSU_Result heap_lock_tuple(Relation relation, HeapTuple tuple,
|
||||
CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy,
|
||||
bool follow_update,
|
||||
|
Reference in New Issue
Block a user