pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Why dos select work when pg_dump fails?
2+ messages / 2 participants
[nested] [flat]

* Why dos select work when pg_dump fails?
@ 2007-11-29 08:07 Darren Reed <darrenr+postgres@fastmail.net>
  2007-11-29 15:20 ` Re: Why dos select work when pg_dump fails? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Darren Reed @ 2007-11-29 08:07 UTC (permalink / raw)
  To: pgsql-admin

For whatever reason, I'm back dealing with corrupted tables but
curiously while this fails:

pg_dump -U postgres -a -t table -f /data/table.dump

this works:

psql -U postgres -A -o /data/table.dump -c "SELECT * FROM table;"

Graned the format of the data is different, but regardless, the data is 
still there.

The message from pg_dump when it fails is:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  out of memory
DETAIL:  Failed on request of size 20.
pg_dump: The command was: SELECT t.tableoid, t.oid, t.relname as 
indexname, pg_catalog.pg_get_indexdef(i.indexrelid) as indexdef, 
t.relnatts as indnkeys, i.indkey, i.indisclustered, c.contype, 
c.conname, c.tableoid as contableoid, c.oid as conoid, (SELECT spcname 
FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) as 
tablespace FROM pg_catalog.pg_index i JOIN pg_catalog.pg_class t ON 
(t.oid = i.indexrelid) LEFT JOIN pg_catalog.pg_depend d ON (d.classid = 
t.tableoid AND d.objid = t.oid AND d.deptype = 'i') LEFT JOIN 
pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid 
= c.oid) WHERE i.indrelid = '16456'::pg_catalog.oid ORDER BY indexname

Darren




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Why dos select work when pg_dump fails?
  2007-11-29 08:07 Why dos select work when pg_dump fails? Darren Reed <darrenr+postgres@fastmail.net>
@ 2007-11-29 15:20 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2007-11-29 15:20 UTC (permalink / raw)
  To: Darren Reed <darrenr+postgres@fastmail.net>; +Cc: pgsql-admin

Darren Reed <darrenr+postgres@fastmail.net> writes:
> For whatever reason, I'm back dealing with corrupted tables but
> curiously while this fails:

> pg_dump -U postgres -a -t table -f /data/table.dump

> this works:

> psql -U postgres -A -o /data/table.dump -c "SELECT * FROM table;"

pg_dump is evidently failing while trying to get the definitions
of that table's indexes.  Does "\d table" work?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-11-29 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 08:07 Why dos select work when pg_dump fails? Darren Reed <darrenr+postgres@fastmail.net>
2007-11-29 15:20 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox