Re: Restarting Slony crashes Postgresql?

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Restarting Slony crashes Postgresql?
Date: 2006-08-16 13:53:34
Message-ID: 874pwc23dt.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In an attempt to throw the authorities off his trail, "Nico" <Nicolas(dot)PAYART(at)gmail(dot)com> transmitted:
> Hi group,
>
> I'm using Slony-I 1.1.5 with Postgresql 8.1.4 on 3 DB server (OS =
> debian sarge).
> I set a replication from a database on server A (master) to 2 servers B
> and C (slaves).
>
> Note that the slaves databases are in production and have a quite big
> load.
>
> I noticed last day that when I stop Slony daemon (for any reason) on a
> slave server (B or C), a few seconds later, the server doesn't respond
> anymore. Then I need to reboot the system. I noticed some "fetch 100
> from LOG" queries on the master database too...
>
> => To prevent the server crashing, It seems that I need to restart
> postgresql just after restarting Slony (and before it all crashes).
>
> Is it always necessary to restart Postgresql after restarting a Slony
> daemon ? (though, it doesn't seem necessary when the servers have not
> many connections)
>
> Any information will be appreciated.

That seems exceeding unusual.

slon daemons are not terribly special; they are merely client apps
written in C that use libpq that connect to multiple databases.

When the Slony-I code was less mature, we used to very frequently shut
down and restart slons on a routine basis...

"There seems to be a problem with replication..."

"... Why not restart the slons and see if that helps..."

- If your system is heavily loaded (notably, if there's a lot of
updates to be replicated), it's no surprise to see "fetch 100 from
LOG" queries

- There are *some* objects that Slony-I locks, but this should
certainly not cover things your applications are using

- That the server would stop responding after stopping slons is *very*
surprising.

I'd be inclined to look at pg_locks to see what's locked; I'm not sure
what to expect, because I'd not expect there to be anything that's
Slony-I's fault.

There is an exception, of course; if the cluster is processing an
EXECUTE SCRIPT event, that locks lots of stuff. But that would seem
worthy of your mention, and again, stopping slons for subscribers
wouldn't appear to be the cause of the problem...
--
let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];;
http://linuxdatabases.info/info/rdbms.html
Sometimes if you have a cappuccino and then try again it will work OK.
- Dr. Brian Reid, 1992
Sometimes one cappucino isn't enough.
- Marcus J. Ranum

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Harald Armin Massa 2006-08-16 14:07:10 Re: Is it possible (postgresql/mysql)
Previous Message Poul Møller Hansen 2006-08-16 13:37:37 Re: Segmentation Fault