Re: pg_dump / copy bugs with "big lines" ?
От
Daniel Verite
Тема
Re: pg_dump / copy bugs with "big lines" ?
Дата
Msg-id
1706e85e-60d2-494e-8a64-9af1e1b2186e@manitou-mail.org
Ответ на
Re: pg_dump / copy bugs with "big lines" ? (Alvaro Herrera)
Список
Дерево обсуждения
pg_dump / copy bugs with "big lines" ? Ronan Dunklau <ronan.dunklau@dalibo.com>
Re: pg_dump / copy bugs with "big lines" ? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: pg_dump / copy bugs with "big lines" ? Ronan Dunklau <ronan.dunklau@dalibo.com>
Re: pg_dump / copy bugs with "big lines" ? Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: pg_dump / copy bugs with "big lines" ? Robert Haas <robertmhaas@gmail.com>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Michael Paquier <michael.paquier@gmail.com>
Re: pg_dump / copy bugs with "big lines" ? Bruce Momjian <bruce@momjian.us>
Re: pg_dump / copy bugs with "big lines" ? Michael Paquier <michael.paquier@gmail.com>
Re: pg_dump / copy bugs with "big lines" ? Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump / copy bugs with "big lines" ? Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Craig Ringer <craig@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pg_dump / copy bugs with "big lines" ? "Daniel Verite" <daniel@manitou-mail.org>
Re: [HACKERS] pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [HACKERS] pg_dump / copy bugs with "big lines" ? Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_dump / copy bugs with "big lines" ? Michael Paquier <michael.paquier@gmail.com>
Re: pg_dump / copy bugs with "big lines" ? Haribabu Kommi <kommi.haribabu@gmail.com>
Re: pg_dump / copy bugs with "big lines" ? Michael Paquier <michael.paquier@gmail.com>
Re: pg_dump / copy bugs with "big lines" ? Jim Nasby <Jim.Nasby@BlueTreble.com>
Alvaro Herrera wrote: > I have now pushed this to 9.5, 9.6 and master. It could be backpatched > to 9.4 with ease (just a small change in heap_form_tuple); anything > further back would require much more effort. > > I used a 32-bit limit using sizeof(int32). I tested and all the > mentioned cases seem to work sanely; if you can spare some more time to > test what was committed, I'd appreciate it. My tests are OK too but I see an issue with the code in enlargeStringInfo(), regarding integer overflow. The bit of comment that says: Note we are assuming here that limit <= INT_MAX/2, else the above loop could overflow. is obsolete, it's now INT_MAX instead of INT_MAX/2. There's a related problem here: newlen = 2 * str->maxlen; while (needed > newlen) newlen = 2 * newlen; str->maxlen is an int going up to INT_MAX so [2 * str->maxlen] now *will* overflow when [str->maxlen > INT_MAX/2]. Eventually it somehow works because of this: if (newlen > limit) newlen = limit; but newlen is wonky (when resulting from int overflow) before being brought back to limit. PFA a minimal fix. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления