Home > Archive > Slony1 PostgreSQL Replication > August 2005 > Multiple slon processes for the same replication









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Multiple slon processes for the same replication
Hong Yuan

2005-08-29, 3:24 am

Hello list,

I have been using slony-1.0.5 for a simple one master one slave=20
replication setup quite stably for some time with postgresql-7.4.7 on=20
both sides.

A week ago, I move the database to another machine and made the=20
necessary modification to slon configuration and the system runs=20
smoothly for a while. However, when today I checked the master node, I=20
find a bunch of slon processes instead of one, which is the number I=20
usually find.

Is it normal for slon to start more than one processes for this setting?=20
I don't think so, but what's the reason that suddenly so many processes=20
come up? And more importantly, is my replication still running correctly=20
now? Though sl_status indicates that there is no lag between the master=20
and slave, I am still worring about the new phenomena.

I started slon on the master node with:

ws2:~# slon slontest "dbname=3Dhomelister host=3Dlocalhost user=3Dpostgre=
s"=20
>master.log 2>&1 &


And after that with 'ps -Af | grep slon', I got:

ws2:~# ps -Af | grep slon
root 6654 3121 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6656 6654 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6657 6656 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6658 6656 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6660 6656 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6661 6656 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6662 6656 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6663 6656 0 12:56 pts/2 00:00:00 slon slontest=20
dbname=3Dhomelister host=3Dlocalhost user=3Dpostgres
root 6851 4307 0 13:20 pts/7 00:00:00 grep slon

How can I find out what is going on and whether any corrective measures=20
are necessary?

Thanks for assistance!

--=20
HONG Yuan

=E5=A4=A7=E7=AE=A1=E
5=AE=B6=E7=BD=91=E4=
B8=8A=E5=BB=BA=E6=9D
=90=E8=B6=85=E5=
=B8=82
http://www.homemaster.cn
Magnus Hagander

2005-08-29, 3:24 am

> Hello list,

>=20
> I have been using slony-1.0.5 for a simple one master one=20
> slave replication setup quite stably for some time with=20
> postgresql-7.4.7 on both sides.
>=20
> A week ago, I move the database to another machine and made=20
> the necessary modification to slon configuration and the=20
> system runs smoothly for a while. However, when today I=20
> checked the master node, I find a bunch of slon processes=20
> instead of one, which is the number I usually find.
>=20
> Is it normal for slon to start more than one processes for=20
> this setting?=20
> I don't think so, but what's the reason that suddenly so many=20
> processes come up? And more importantly, is my replication=20
> still running correctly now? Though sl_status indicates that=20
> there is no lag between the master and slave, I am still=20
> worring about the new phenomena.


Is this linux, or another OS where threads show up as processes in ps?
If so, there's your explanatino - they may not be processes at all, but
just threads in the process. Which is perfectly normal.
Not sure if it's even possible to see what's a thread and what's a
process in linux.

Apart from that, AFAIK slon will have 2 processes in 1.1, but I think it
should only be one in 1.0.


//Magnus
Christopher Browne

2005-08-29, 11:24 am

Hong Yuan wrote:

> Hello list,
>
> I have been using slony-1.0.5 for a simple one master one slave
> replication setup quite stably for some time with postgresql-7.4.7 on
> both sides.
>
> A week ago, I move the database to another machine and made the
> necessary modification to slon configuration and the system runs
> smoothly for a while. However, when today I checked the master node, I
> find a bunch of slon processes instead of one, which is the number I
> usually find.
>
> Is it normal for slon to start more than one processes for this
> setting? I don't think so, but what's the reason that suddenly so many
> processes come up? And more importantly, is my replication still
> running correctly now? Though sl_status indicates that there is no lag
> between the master and slave, I am still worring about the new phenomena.
>
> I started slon on the master node with:
>
> ws2:~# slon slontest "dbname=homelister host=localhost user=postgres"
>
> And after that with 'ps -Af | grep slon', I got:
>
> ws2:~# ps -Af | grep slon
> root 6654 3121 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6656 6654 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6657 6656 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6658 6656 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6660 6656 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6661 6656 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6662 6656 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6663 6656 0 12:56 pts/2 00:00:00 slon slontest
> dbname=homelister host=localhost user=postgres
> root 6851 4307 0 13:20 pts/7 00:00:00 grep slon
>
> How can I find out what is going on and whether any corrective
> measures are necessary?
>
> Thanks for assistance!
>

Is this on Linux?

On Linux, it is common for threads to be listed in the process table as
if they were processes.

slon is a multithreaded process, so it could, in that case, appear as
though it was being listed in the process table as many times as there
are threads + processes...
Hong Yuan

2005-08-30, 3:25 am

Thanks, Magnus,

Indeed it is Linux. And I was not aware that threads show up as process=20
in ps.

In the past when I use the same 'ps -Af' there was always only one=20
'slon' entry. So what actually made me uneasy was the sudden change in=20
the output from the same command I had been using for a while.

What could be the reason that the output of 'ps' command changes? What=20
causes slon to spawn multiple threads? On my slave machine for example,=20
there is still only one 'slon' entry using the same 'ps -Af'?

Magnus Hagander wrote:

>Is this linux, or another OS where threads show up as processes in ps?
>If so, there's your explanatino - they may not be processes at all, but
>just threads in the process. Which is perfectly normal.
>Not sure if it's even possible to see what's a thread and what's a
>process in linux.
>
>Apart from that, AFAIK slon will have 2 processes in 1.1, but I think it
>should only be one in 1.0.
>
>
>//Magnus
> =20
>

--=20

HONG Yuan

=E5=A4=A7=E7=AE=A1=E
5=AE=B6=E7=BD=91=E4=
B8=8A=E5=BB=BA=E6=9D
=90=E8=B6=85=E5=
=B8=82
http://www.homemaster.cn
Alan Hodgson

2005-08-30, 3:25 am

On Tue, Aug 30, 2005 at 09:55:19AM +0800, Hong Yuan wrote:
> What could be the reason that the output of 'ps' command changes? What
> causes slon to spawn multiple threads? On my slave machine for example,
> there is still only one 'slon' entry using the same 'ps -Af'?



I would expect you're using a different version of ps. Try ps -am.


--
"Government's view of the economy could be summed up in a few short phrases:
If it moves, tax it. If it keeps moving, regulate it. And if it stops moving,
subsidise it." - Ronald Reagan
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com