Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
От | Andres Freund |
---|---|
Тема | Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples |
Дата | |
Msg-id | 20180522161645.ovmmqou2uloy7jdg@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: COPY FROM WITH HEADER skips a tuple every 4 billion tuples
|
Список | pgsql-hackers |
On 2018-05-22 11:55:26 -0400, Tom Lane wrote: > 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? Yes, it's a local counter in CopyFrom/CopyTo. It's probably not entirely trivial to unify the two. The batching etc makes us modify cur_lineno in a bit weird ways at times. It's noteworthy that the comment for cur_lineno says: /* line number for error messages */ Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: