Problem with pg_dump

Поиск
Список
Период
Сортировка
Искать

Problem with pg_dump

От:
znahor-news@netsync.pl
Дата:
Hi!

I've got problem with dumping the database on the slave server.

Situation:

Master:
Running CentOS release 4.4 (Final) with PostgreSQL 8.2.4.

Slave:
Running CentOS release 4.3 (Final) with PostgreSQL 8.2.4 and slon 
version 1.2.9

pg_dump on master works fine. On slave i've got error on start of 
dumping:

-bash-3.00$ pg_dump -d -D my_database
pg_dump: failed sanity check, parent table OID 225893092 of 
pg_rewrite entry OID 225893271 not found

Any ideas to solve this problem?

Best regards,

Piotr Konieczny

Re: Problem with pg_dump

От:
Richard Huxton <dev@archonet.com>
Дата:
znahor-news@netsync.pl wrote:
> Hi!
> 
> I've got problem with dumping the database on the slave server.
> 
> Situation:
> 
> Master:
> Running CentOS release 4.4 (Final) with PostgreSQL 8.2.4.
> 
> Slave:
> Running CentOS release 4.3 (Final) with PostgreSQL 8.2.4 and slon 
> version 1.2.9
> 
> pg_dump on master works fine. On slave i've got error on start of dumping:
> 
> -bash-3.00$ pg_dump -d -D my_database
> pg_dump: failed sanity check, parent table OID 225893092 of pg_rewrite 
> entry OID 225893271 not found
> 
> Any ideas to solve this problem?

Do you have such a table, and what does the rule (pg_rewrite) say?

SELECT OID,* FROM pg_class WHERE OID = ...
SELECT OID,* FROM pg_rewrite WHERE OID = ...

Have you made any schema changes that slony might not have handled? You 
didn't apply schema changes without putting them through slony, did you?

-- 
   Richard Huxton
   Archonet Ltd

Re: Problem with pg_dump

От:
Andrew Sullivan <ajs@crankycanuck.ca>
Дата:
On Tue, May 22, 2007 at 04:36:49PM +0200, znahor-news@netsync.pl wrote:
> pg_dump on master works fine. On slave i've got error on start of 
> dumping:
> 
> -bash-3.00$ pg_dump -d -D my_database
> pg_dump: failed sanity check, parent table OID 225893092 of 
> pg_rewrite entry OID 225893271 not found

You're using Slony, right?  You can't use pg_dump on a database where
_any_ table is Slony-replicated right now.  Yes, this is due to the
catalogue corruption Slony introduces.  There's an alternative in the
Slony tools/ directory.  

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
Everything that happens in the world happens at some place.
		--Jane Jacobs 

Re: Problem with pg_dump

От:
"Joshua D. Drake" <jd@commandprompt.com>
Дата:
Andrew Sullivan wrote:
> On Tue, May 22, 2007 at 04:36:49PM +0200, znahor-news@netsync.pl wrote:
>> pg_dump on master works fine. On slave i've got error on start of 
>> dumping:
>>
>> -bash-3.00$ pg_dump -d -D my_database
>> pg_dump: failed sanity check, parent table OID 225893092 of 
>> pg_rewrite entry OID 225893271 not found
> 
> You're using Slony, right?  You can't use pg_dump on a database where
> _any_ table is Slony-replicated right now.  Yes, this is due to the
> catalogue corruption Slony introduces.  There's an alternative in the
> Slony tools/ directory.  

*cough*

catalog features Slony adds.


Joshua D. Drake


> 
> A
> 


-- 

       === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

Re: Problem with pg_dump

От:
Richard Huxton <dev@archonet.com>
Дата:
Andrew Sullivan wrote:
> On Tue, May 22, 2007 at 04:36:49PM +0200, znahor-news@netsync.pl wrote:
>> pg_dump on master works fine. On slave i've got error on start of 
>> dumping:
>>
>> -bash-3.00$ pg_dump -d -D my_database
>> pg_dump: failed sanity check, parent table OID 225893092 of 
>> pg_rewrite entry OID 225893271 not found
> 
> You're using Slony, right?  You can't use pg_dump on a database where
> _any_ table is Slony-replicated right now.  Yes, this is due to the
> catalogue corruption Slony introduces.  There's an alternative in the
> Slony tools/ directory.  

I'll be - I've obviously never tried pg_dump-ing a slave node. It does 
say it here in black-and white though:

"This represents something of a "corruption" of the data dictionary, and 
is why you should not directly use pg_dump to dump schemas on subscribers."
http://slony.info/adminguide/slony1-1.2.6/doc/adminguide/slonyintro.html

-- 
   Richard Huxton
   Archonet Ltd
FAQ