Skip to content

Commit b852e45

Browse files
authored
Band aid fix for row visibility issue in output clause (babelfish-for-postgresql#683)
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 1c9a27f commit b852e45

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
@@ -24,6 +24,7 @@
2424

2525
#include "access/sysattr.h"
2626
#include "access/tableam.h"
27+
#include "catalog/namespace.h"
2728
#include "catalog/pg_type.h"
2829
#include "executor/executor.h"
2930
#include "executor/nodeTidscan.h"
@@ -404,6 +405,13 @@ TidRecheck(TidScanState *node, TupleTableSlot *slot)
404405
{
405406
ItemPointer match;
406407

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

0 commit comments

Comments
 (0)