Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples - Mailing list pgsql-hackers

From Andres Freund
Subject Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
Date
Msg-id 20180522213111.7cxyfmgrdjqfa7yv@alap3.anarazel.de
Whole thread Raw
In response to Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples  (David Rowley <david.rowley@2ndquadrant.com>)
Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2018-05-23 09:04:35 +1200, David Rowley wrote:
> Thanks for pushing.
> 
> On 23 May 2018 at 03:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Hm, so why is the correct rowcount returned --- are we running
> > a separate counter for that purpose, and if so why?
> 
> I thought the output I pasted was clearly showing it not to be the
> same. 4299999999 vs 4300000000.
> 
> Did I misunderstand you?

Well, the row-returned counter is obviously wide enough, otherwise
4299999999 couldn't be returned. Tom's point, as I understood it, is
that we obviously have one wide enough counter - why can't we reuse that
for the one you made wider.  And it doesn't seem entirely trivial to do
so, so your patch is easier.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
Next
From: David Rowley
Date:
Subject: Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples