Обсуждение: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

Поиск
Список
Период
Сортировка

pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

От
Peter Eisentraut
Дата:
Change timeline field of IDENTIFY_SYSTEM to int8

It was int4, but in the other replication commands, timelines are
returned as int8.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/7e4fdbdc-699c-4cd0-115d-fb78a957fc22@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ec40f3422412cfdc140b5d3f67db7fd2dac0f1e2

Modified Files
--------------
doc/src/sgml/protocol.sgml          | 2 +-
src/backend/replication/walsender.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

От
Tom Lane
Дата:
Peter Eisentraut <peter@eisentraut.org> writes:
> Change timeline field of IDENTIFY_SYSTEM to int8

Surely this patch is far from complete?

To start with, just a few lines down in IdentifySystem() the column
is filled using Int32GetDatum not Int64GetDatum.  I will get some
popcorn and await the opinions of the 32-bit buildfarm animals.

But what about whatever code is reading the output?  And what if
that code isn't v16?  I can't believe that we can make a wire
protocol change as summarily as this.

            regards, tom lane



Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

От
Tom Lane
Дата:
I wrote:
> To start with, just a few lines down in IdentifySystem() the column
> is filled using Int32GetDatum not Int64GetDatum.  I will get some
> popcorn and await the opinions of the 32-bit buildfarm animals.

Didn't need to wait long:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=florican&dt=2022-07-04%2005%3A39%3A50

The other questions still stand.

            regards, tom lane



Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

От
Michael Paquier
Дата:
On Mon, Jul 04, 2022 at 01:55:13AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
> > Change timeline field of IDENTIFY_SYSTEM to int8
>
> Surely this patch is far from complete?

Yeah..

> But what about whatever code is reading the output?  And what if
> that code isn't v16?  I can't believe that we can make a wire
> protocol change as summarily as this.

Assuming that one reaches a timeline of 2 billion, this change would
make the TLI consumption of the client safe to signedness.  But why is
it safe to do a protocol change when running IDENTIFY_SYSTEM?  We've
been very strict to maintain compatibility for any protocol change,
hence why should the replication protocol be treated differently?
--
Michael

Вложения