"Vitaly Lopatin" <vitaly.lopatin@gmail.com> writes:
> 1. In start I used 8.3.1. Once, I got error:
> ERROR: database is not accepting commands to avoid wraparound data loss in
> database "ppcs_ts"
How did you manage that? autovacuum should have taken preventive action
long before you'd get any such warning. Are you using nondefault
autovacuum settings, and if so what are they?
> pg_dump: Error message from server: ERROR: more than one row returned by a
> subquery used as an expression
> pg_dump: The command was: SELECT tableoid, oid, typname, typnamespace,
> (SELECT rolname FROM pg_catalog.pg_roles WHERE oid = typowner) as rolname,
> typinput
Does vacuuming pg_class fix this? If not, try manually removing the
older of the duplicate rows (select it by ctid). Make sure the one you
leave behind has a relfilenode matching the table on disk.
The whole thing looks like catalog corruption issues to me. Have you
had any system crashes lately? Are you sure your disks are not
configured to lie about write-complete?
regards, tom lane