Обсуждение: BUG #11022: \copy report negative row number

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

BUG #11022: \copy report negative row number

От
amutu@amutu.com
Дата:
The following bug has been logged on the website:

Bug reference:      11022
Logged by:          Jov
Email address:      amutu@amutu.com
PostgreSQL version: 9.2.4
Operating system:   CentOS 6.5
Description:

psql 9.3.2
pg server 9.2.4

when \copy a big file with 6billion rows,some one kill -9 the server,I find
client message report negative row numbers:
CONTEXT:  COPY a_xxx, line -1454214895:
"3756115934|0000000353532046|80176761|2.72|00089114|2011-12-16
11:04:53|20111216|201112|2141101|00911..."

Re: BUG #11022: \copy report negative row number

От
John R Pierce
Дата:
On 7/22/2014 10:15 PM, amutu@amutu.com wrote:
> psql 9.3.2
> pg server 9.2.4
>
> when \copy a big file with 6billion rows,some one kill -9 the server,I find
> client message report negative row numbers:
> CONTEXT:  COPY a_xxx, line -1454214895:

so, the actual bug is that the 32 bit line counter wrapped around on
this very large file?

hmmm.




--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

Re: BUG #11022: \copy report negative row number

От
Jov
Дата:
I think so.
32 bit counter can count ~ 4 billion rows,this file has 6 billion rows.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>


2014-07-23 13:32 GMT+08:00 John R Pierce <pierce@hogranch.com>:

> On 7/22/2014 10:15 PM, amutu@amutu.com wrote:
>
>> psql 9.3.2
>> pg server 9.2.4
>>
>> when \copy a big file with 6billion rows,some one kill -9 the server=EF=
=BC=8CI
>> find
>> client message report negative row numbers=EF=BC=9A
>> CONTEXT:  COPY a_xxx, line -1454214895:
>>
>
> so, the actual bug is that the 32 bit line counter wrapped around on this
> very large file?
>
> hmmm.
>
>
>
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

Re: BUG #11022: \copy report negative row number

От
John R Pierce
Дата:
On 7/22/2014 11:25 PM, Jov wrote:
> I think so.
> 32 bit counter can count ~ 4 billion rows,this file has 6 billion rows.

a 32 bit integer counts to ~2 billion then wraps around to -2 billion.
(2^31-1 and -2^31 to be precise)



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast