postgres_fdw could support row comparison pushdown - Mailing list pgsql-hackers

From Alexander Pyhalov
Subject postgres_fdw could support row comparison pushdown
Date
Msg-id 28fd431fdb4272eebf55f3200eb6af83@postgrespro.ru
Whole thread Raw
List pgsql-hackers
Hi.

postgres_fdw currently doesn't handle RowCompareExpr, which doesn't 
allow keyset pagination queries to be efficiently executed over sharded 
table.
Attached patch adds handling of RowCompareExpr in deparse.c, so that we 
could push down conditions like
WHERE (created, id) > ('2023-01-01 00:00:00'::timestamp, 12345) to the 
foreign server.

I'm not sure about conditions when it's possible for RowCompareExpr to 
have opnos with different names or namespaces, but comment in 
ruleutils.c suggests that this is possible, so I've added check for this 
in foreign_expr_walker().
-- 
Best regards,
Alexander Pyhalov,
Postgres Professional
Attachment

pgsql-hackers by date:

Previous
From: Sandro Santilli
Date:
Subject: Re: [PATCH] Support % wildcard in extension upgrade filenames
Next
From: Masahiko Sawada
Date:
Subject: Re: Performance degradation on concurrent COPY into a single relation in PG16.