[Pgcluster-general] pgreplicate does not remove pid file
a.mitani at sra-europe.com
a.mitani at sra-europe.com
Thu Feb 22 15:14:40 UTC 2007
Hi,
Exactly, It's a bug.
Please adapt the following patch to src/pgcluster/pgrp/pgrepicate.c
--- replicate.c.old 2007-02-22 15:31:32.129443676 +0100
+++ replicate.c 2007-02-22 15:32:06.294224277 +0100
@@ -914,7 +914,7 @@
sem_quit(VacuumSemID);
}
- snprintf(fname, sizeof(fname), "%s/%s", PGR_Data_Path,
PGREPLICATE_PID_FILE);
+ snprintf(fname, sizeof(fname), "%s/%s", PGR_Write_Path,
PGREPLICATE_PID_FILE);
unlink(fname);
And I also uploaded this patch as "pgrp-pid-erase-patch" into the
pgFoundry site.
Regards,
--------------
At.Mitani
>> Would you let me know your test procedure.
>
> Almost the same:
>
> 15:51:31 chip (root):~>ls -al /var/lib/pgsql/clusterdata/
> total 12
> drwx------ 2 postgres postgres 4096 Feb 22 15:51 .
> drwx------ 8 postgres postgres 4096 Feb 21 17:51 ..
> -rw-r--r-- 1 postgres postgres 1203 Feb 22 11:47 pglb.sts
> 15:51:57 chip (root):~>su - postgres -c "pgreplicate -U postgres -D
> /var/lib/pgsql/clusterconf -W /var/lib/pgsql/clusterdata"
> 15:52:08 chip (root):~>ls -al /var/lib/pgsql/clusterdata/
> total 16
> drwx------ 2 postgres postgres 4096 Feb 22 15:52 .
> drwx------ 8 postgres postgres 4096 Feb 21 17:51 ..
> -rw-r--r-- 1 postgres postgres 1203 Feb 22 11:47 pglb.sts
> -rw-r--r-- 1 postgres postgres 4 Feb 22 15:52 pgreplicate.pid
> srwxrwx--- 1 postgres postgres 0 Feb 22 15:52 .s.PGRLOG.8301
> 15:52:10 chip (root):~>su - postgres -c "pgreplicate -U postgres -D
> /var/lib/pgsql/clusterconf -W /var/lib/pgsql/clusterdata stop"
> 15:52:20 chip (root):~>ls -al /var/lib/pgsql/clusterdata/
> total 16
> drwx------ 2 postgres postgres 4096 Feb 22 15:52 .
> drwx------ 8 postgres postgres 4096 Feb 21 17:51 ..
> -rw-r--r-- 1 postgres postgres 1203 Feb 22 11:47 pglb.sts
> -rw-r--r-- 1 postgres postgres 4 Feb 22 15:52 pgreplicate.pid
>
> The only difference seems to be that I'm using different
> directories for configuration and work data. I just tested and, indeed,
> when workdir is the same as the configuration dir the pid file is removed.
> Probably somewhere in the code someone assumed that these directories are
> the same...
>
> --
> Victor Tarhon-Onu
> Lead Systems Administrator
> ActiveMedia Technology
> http://www.activemediatech.com
> .............................................................................
> This communication contains information that is confidential and may also
> be
> privileged. It is for the exclusive use of the intended recipient(s). If
> you
> are not the intended recipient(s) please note that any form of
> distribution,
> copying or use of this communication or the information in it is strictly
> prohibited and may be unlawful. If you have received this communication in
> error kindly notify the sender immediately and delete it from your system.
> _______________________________________________
> Pgcluster-general mailing list
> Pgcluster-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgcluster-general
>
More information about the Pgcluster-general
mailing list