hannu at skype.net hannu
Mon Oct 18 23:18:29 PDT 2004
> Running from REL_1_0_STABLE with postgres 7.4.5 on Solaris 9, I'm getting
> a "slave" slon cleanup thread error:
>
> FATAL  cleanupThread: "vacuum analyze "__dap".sl_event; vacuum analyze
> "__dap".sl_confirm; vacuum analyze "__dap".sl_setsync; vacuum analyze
> "__dap".sl_log_1; vacuum analyze "__dap".sl_log_2;vacuum analyze
> "__dap".sl_seqlog;vacuum analyze pg_catalog.pg_listener;" - ERROR:
> duplicate key violates unique constraint "pg_statistic_relid_att_index"
> DEBUG1 main: scheduler mainloop returned
>
> Has anybody else seen this? I assume I screwed up my configuration
> somehow, but I'm not sure where to start looking.

seems you have managed to get duplicate row into pg_statistic (the table
ANALYZE stores statistical info in)

I may be mistaken, but AFAIK slon does not go deep enough into postgres to
be able to do that - this is probably a bug somewhere else.

You can find the violating rows using

select starelid, staattnum, count(*) from pg_statistic group by 1,2 having
count(*) > 1;

and then find out the one to delete by

select oid, * from pg_statistic where starelid=XX and staattnum=YY;

and then delete one of the rows doing

delete from pg_statistic where oid=OO;

------------------
Hannu





More information about the Slony1-general mailing list