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

From Tom Lane
Subject Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
Date
Msg-id 7911.1527004526@sss.pgh.pa.us
Whole thread Raw
In response to 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  (Andres Freund <andres@anarazel.de>)
Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> while it might not look too scary by itself, it gets a bit more so
> when you learn that the cur_lineno is only 32 bits wide. This will
> result in skipping a tuple every time the 32-bit variable wraps back
> around to 0 again.

Hm, so why is the correct rowcount returned --- are we running
a separate counter for that purpose, and if so why?

            regards, tom lane


pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Postgres, fsync, and OSs (specifically linux)
Next
From: Tom Lane
Date:
Subject: Re: ppc64le support in 9.3 branch?