pg_dump throwing "column number -1 is out of range 0..36" on HEAD

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: pg_dump throwing "column number -1 is out of range 0..36" on HEAD
Date: 2019-05-22 08:34:17
Message-ID: 20190522083038.GA16837@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Trying to do pg_dump[all] on a 9.5 or older server results in spurious
failures:
pg_dump: column number -1 is out of range 0..36

After looking around, the problem comes from
check_tuple_field_number(), more specifically from getTables() where
someone has forgotten to add NULL values for amname when querying
older server versions.

Attached is a patch to fix that. I am not seeing other failures with
an instance that includes all the contents of installcheck, so it
seems that the rest is fine.

This needs to be applied to HEAD, so I am adding an open item.

Any objections to the attached?
--
Michael

Attachment Content-Type Size
dump-incorrect-colnum.patch text/x-diff 3.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2019-05-22 09:05:07 Re: pg_dump throwing "column number -1 is out of range 0..36" on HEAD
Previous Message Daniel Gustafsson 2019-05-22 08:25:14 Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?