postgres_fdw binary protocol support

From: Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: postgres_fdw binary protocol support
Date: 2022-11-21 15:20:06
Message-ID: bdcd133b31d21f7858066079e15bd39249bb5e07.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi everyone,

I have made a patch that introduces support for libpq binary protocol
in postgres_fdw. The idea is simple, when a user knows that the foreign
server is binary compatible with the local and his workload could
somehow benefit from using binary protocol, it can be switched on for a
particular server or even a particular table. 

The patch adds a new foreign server and table option 'binary_format'
(by default off) and implements serialization/deserialization of query
results and parameters for binary protocol. I have tested the patch by
switching foreign servers in postgres_fdw.sql tests to binary_mode, the
only diff was in the text of the error for parsing an invalid integer
value, so it worked as expected for the test. There are a few minor
issues I don't like in the code and I am yet to write the tests and
docs for it. It would be great to get some feedback and understand,
whether this is a welcome feature, before proceeding with all of the
abovementioned.

Thanks,
Ilya Gladyshev

Attachment Content-Type Size
0001-postgres_fdw-libpq-binary-proto-support.patch text/x-patch 31.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-11-21 15:22:55 Re: Damage control for planner's get_actual_variable_endpoint() runaway
Previous Message sirisha chamarthi 2022-11-21 15:18:09 Re: Catalog_xmin is not advanced when a logical slot is lost