RE: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)

From: Badrul Chowdhury <bachow(at)microsoft(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Satyanarayana Narlapuram <Satyanarayana(dot)Narlapuram(at)microsoft(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)
Date: 2017-11-20 00:49:21
Message-ID: BN6PR21MB07728666CC8B78871BF86BD4D1220@BN6PR21MB0772.namprd21.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> I spent a little more time looking at this patch today. I think that the patch
>> should actually send NegotiateProtocolVersion when *either* the requested
>> version is differs from the latest one we support *or* an unsupported protocol
>> option is present. Otherwise, you only find out about unsupported protocol
>> options if you also request a newer minor version, which isn't good, because it
>> makes it hard to add new protocol options *without* bumping the protocol
>> version.

It makes sense from a maintainability point of view.

>> Here's an updated version with that change and a proposed commit message.

I have tested the new patch and it works great. The comments look good as well.

Thanks,
Badrul

>> -----Original Message-----
>> From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
>> Sent: Wednesday, November 15, 2017 1:12 PM
>> To: Badrul Chowdhury <bachow(at)microsoft(dot)com>
>> Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>; Satyanarayana Narlapuram
>> <Satyanarayana(dot)Narlapuram(at)microsoft(dot)com>; Craig Ringer
>> <craig(at)2ndquadrant(dot)com>; Peter Eisentraut <peter_e(at)gmx(dot)net>; Magnus
>> Hagander <magnus(at)hagander(dot)net>; PostgreSQL-development <pgsql-
>> hackers(at)postgresql(dot)org>
>> Subject: Re: [HACKERS] Re: protocol version negotiation (Re: Libpq
>> PGRES_COPY_BOTH - version compatibility)
>>
>> On Mon, Oct 30, 2017 at 9:19 PM, Badrul Chowdhury
>> <bachow(at)microsoft(dot)com> wrote:
>> > Thank you for the comprehensive review! We are very much in the early
>> stages of contributing to the PG community and we clearly have lots to learn,
>> but we look forward to becoming proficient and active members of the pg
>> community.
>> >
>> > Regarding the patch, I have tested it extensively by hand and it works great.
>>
>> I spent a little more time looking at this patch today. I think that the patch
>> should actually send NegotiateProtocolVersion when *either* the requested
>> version is differs from the latest one we support *or* an unsupported protocol
>> option is present. Otherwise, you only find out about unsupported protocol
>> options if you also request a newer minor version, which isn't good, because it
>> makes it hard to add new protocol options *without* bumping the protocol
>> version.
>>
>> Here's an updated version with that change and a proposed commit message.
>>
>> --
>> Robert Haas
>> EnterpriseDB:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ent
>> erprisedb.com&data=02%7C01%7Cbachow%40microsoft.com%7Ce37b69223
>> a144d1e5b7408d52c6d8171%7C72f988bf86f141af91ab2d7cd011db47%7C1
>> %7C0%7C636463771208784375&sdata=1%2FDylQIfS2rI2RwIVyZnDCUbzRQJe
>> V4YM8J496QkpiQ%3D&reserved=0
>> The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2017-11-20 01:09:16 Re: [HACKERS] CUBE seems a bit confused about ORDER BY
Previous Message Tomas Vondra 2017-11-20 00:42:16 Re: [HACKERS] GnuTLS support