pg_dump in current master segfaults when dumping 9.2/9.1 databases

Started by Bernd Helmlealmost 13 years ago2 messages
#1Bernd Helmle
mailings@oopsware.de

My current master segfaults with pg_dump when dumping a 9.1 or 9.2 database:

$ LC_ALL=en_US.utf8 pg_dump -s -p 5448
pg_dump: column number -1 is out of range 0..22
zsh: segmentation fault LC_ALL=en_US.utf8 pg_dump -s -p 5448

The reason seems to be that getTables() in pg_dump.c forget to select
relpages in the query for releases >= 90100. The error message comes from
PQgetvalue(res, i, i_relpages), which complains about i_relpages being -1,
which will then return NULL...

--
Thanks

Bernd

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: Bernd Helmle (#1)
Re: pg_dump in current master segfaults when dumping 9.2/9.1 databases

On 26.03.2013 15:31, Bernd Helmle wrote:

My current master segfaults with pg_dump when dumping a 9.1 or 9.2
database:

$ LC_ALL=en_US.utf8 pg_dump -s -p 5448
pg_dump: column number -1 is out of range 0..22
zsh: segmentation fault LC_ALL=en_US.utf8 pg_dump -s -p 5448

The reason seems to be that getTables() in pg_dump.c forget to select
relpages in the query for releases >= 90100. The error message comes
from PQgetvalue(res, i, i_relpages), which complains about i_relpages
being -1, which will then return NULL...

Thanks, fixed.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers