Re: postgres_fdw binary protocol support

From: Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: postgres_fdw binary protocol support
Date: 2022-11-24 12:15:56
Message-ID: 0002B5B0-E328-4CEC-BE5F-89D711B6AF40@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 22 нояб. 2022 г., в 17:10, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> написал(а):
>
> Hi Illya,
>
> On Mon, Nov 21, 2022 at 8:50 PM Ilya Gladyshev
> <ilya(dot)v(dot)gladyshev(at)gmail(dot)com> wrote:
>>
>> 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.
>>
>
> Why do we need this feature? If it's for performance then do we have
> performance numbers?
Yes, it is for performance, but I am yet to do the benchmarks. My initial idea was that binary protocol must be more efficient than text, because as I understand that’s the whole point of it. However, the minor tests that I have done do not prove this and I couldn’t find any benchmarks for it online, so I will do further tests to find a use case for it.
> About the patch itself, I see a lot of if (binary) {} else {} block
> which are repeated. It will be good if we can add functions/macros to
> avoid duplication.
Yea, that’s true, I have some ideas about improving it

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-11-24 12:16:23 Re: Schema variables - new implementation for Postgres 15
Previous Message Sergey Shinderuk 2022-11-24 11:52:30 Re: Bug in row_number() optimization