Skip to content

Commit b15ead9

Browse files
authored
Band aid fix for row visibility issue in output clause (babelfish-for-postgresql#684)
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 85e7300 commit b15ead9

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/execdebug.h"
2930
#include "executor/nodeTidscan.h"
@@ -405,6 +406,13 @@ TidRecheck(TidScanState *node, TupleTableSlot *slot)
405406
{
406407
ItemPointer match;
407408

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

0 commit comments

Comments
 (0)