Re: Extensibility of the PostgreSQL wire protocol

From: Hannu Krosing <hannuk(at)google(dot)com>
To: Jan Wieck <jan(at)wi3ck(dot)info>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Dave Cramer <davecramer(at)postgres(dot)rocks>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Extensibility of the PostgreSQL wire protocol
Date: 2021-03-05 00:38:02
Message-ID: CAMT0RQSpbKzYHsNSyBKF8rBRuiHwygRtQgN3hmPN9QbqprTKhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 4, 2021 at 9:55 PM Jan Wieck <jan(at)wi3ck(dot)info> wrote:
>
> Another possibility, and this is what is being used by the AWS team
> implementing the TDS protocol for Babelfish, is to completely replace
> the entire TCOP mainloop function PostgresMain().

I suspect this is the only reasonable way to do it for protocols which are
not very close to libpq.

> That is of course a
> rather drastic move and requires a lot more coding on the extension
> side,

Not necessarily - if the new protocol is close to existing one, then it is
copy/paste + some changes.

If it is radically different, then trying to fit it into the current
mainloop will
be even harder than writing from scratch.

And will very likely fail in the end anyway :)

> but the whole thing was developed that way from the beginning and
> it is working. I don't have a definitive date when that code will be
> presented. Kuntal or Prateek may be able to fill in more details.

Are you really fully replacing the main loop, or are you running a second
main loop in parallel in the same database server instance, perhaps as
a separate TDS_postmaster backend ?

Will the data still also be accessible "as postgres" via port 5432 when
TDS/SQLServer support is active ?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-03-05 00:43:35 Re: PoC/WIP: Extended statistics on expressions
Previous Message Tomas Vondra 2021-03-05 00:37:54 Re: WIP: BRIN multi-range indexes