pg_dumpall: query failed:

Started by Guido Notariover 22 years ago2 messagesgeneral
Jump to latest
#1Guido Notari
gnotari@linkgroup.it

I have this problem with a nightly script that dumps the db:

pg_dumpall: query failed: ERROR: Unable to convert abstime 'invalid' to
timestamp
pg_dumpall: query was: SELECT usename, usesysid, passwd, usecreatedb,
usesuper, CAST(valuntil AS timestamp) FROM pg_shadow WHERE usesysid <>
(SELECT datdba FROM pg_database WHERE datname = 'template0');

Postgres version is 7.3.2.

Any hints?

ciao
Guido

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Guido Notari (#1)
Re: pg_dumpall: query failed:

gnotari@linkgroup.it writes:

I have this problem with a nightly script that dumps the db:
pg_dumpall: query failed: ERROR: Unable to convert abstime 'invalid' to
timestamp
pg_dumpall: query was: SELECT usename, usesysid, passwd, usecreatedb,
usesuper, CAST(valuntil AS timestamp) FROM pg_shadow WHERE usesysid <>
(SELECT datdba FROM pg_database WHERE datname = 'template0');

Hm, I'm surprised no one has complained of this before. I guess it's
not common to put 'invalid' into pg_shadow.valuntil.

The cast to timestamp is really unnecessary, so I've fixed the problem
for 7.4 by taking it out. You could do the same to your copy of
pg_dumpall.c, or you could change the pg_shadow entry to be NULL rather
than 'invalid'.

regards, tom lane