From: | Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | postgres_fdw could support row comparison pushdown |
Date: | 2023-08-07 14:02:39 |
Message-ID: | 28fd431fdb4272eebf55f3200eb6af83@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
0001-postgres_fdw-support-RowCompareExpr-pushdown.patch | text/x-diff | 8.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2023-08-07 14:05:39 | Re: Performance degradation on concurrent COPY into a single relation in PG16. |
Previous Message | Sandro Santilli | 2023-08-07 13:55:32 | Re: [PATCH] Support % wildcard in extension upgrade filenames |