Skip to content

Commit bf396fe

Browse files
authored
Band aid fix for row visibility issue in output clause (babelfish-for-postgresql#685)
Community commit "Add missing EPQ recheck for TID Scan" breaks babelfish's implementation of output clause as it depends upon self joining the target table for update with itself with ctid in join condition. As a short term fix we are disabling this community fix for babelfish connections and revisit this later on. Authored-by: Tanzeel Khan tzlkhan@amazon.com Signed-off-by: Jaspal Singh ijaspals@amazon.com Issues Resolved BABEL-6276
1 parent 3c9afd1 commit bf396fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/backend/executor/nodeTidscan.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "executor/nodeTidscan.h"
3030
#include "lib/qunique.h"
3131
#include "miscadmin.h"
32+
#include "libpq/libpq-be.h"
3233
#include "nodes/nodeFuncs.h"
3334
#include "storage/bufmgr.h"
3435
#include "utils/array.h"
@@ -402,6 +403,13 @@ TidRecheck(TidScanState *node, TupleTableSlot *slot)
402403
{
403404
ItemPointer match;
404405

406+
/*
407+
* For babelfish skip the EPQ recheck condition in favour of previous
408+
* behaviour as it causes regression to output clause.
409+
*/
410+
if (MyProcPort && MyProcPort->is_tds_conn)
411+
return true;
412+
405413
/* WHERE CURRENT OF always intends to resolve to the latest tuple */
406414
if (node->tss_isCurrentOf)
407415
return true;

0 commit comments

Comments
 (0)