Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples

From: Andres Freund <andres(at)anarazel(dot)de>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
Date: 2018-05-22 21:31:11
Message-ID: 20180522213111.7cxyfmgrdjqfa7yv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-05-22 21:39:14 Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
Previous Message David Rowley 2018-05-22 21:26:58 Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples