First of all i'd like to apologize for my poor english.
I've recently discover repmgr and i have to say is one of the best and interesting tools for Postgres. I'm deploying a two node HA cluster with repmgr, firstly i thought to make it with repmgr 1.2 + pgBouncer, but at last i'll try repmgr 2.0.
My question is very simple and perhaps there is a previous answer, ¿why has to be set to 5000 the wal_keep_segments for repmgr works? that means to reserve 80GB free on my server disks, something complicated cause i could only reserve 10GB. ¿How can i do it?
> My question is very simple and perhaps there is a previous answer, > ¿why has to be set to 5000 the wal_keep_segments for repmgr works? > that means to reserve 80GB free on my server disks, something > complicated cause i could only reserve 10GB. ¿How can i do it?
That is something that can be configured. Look at the -w configuration option. The number of WALs to be kept is strictly dependant on the production environment where repmgr is deployed.
You need to monitor the number of WAL files regularly produced by your Postgres server, then make a decision. You can start with 100 for instance (1.6GB).
Cheers,
Gabriele
-- Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele.bartol...@2ndQuadrant.it | www.2ndQuadrant.it
I have a pretty run-of-the-mill install of postgresql 9.1.5 on Ubuntu 12.04. When I run repmgr -f /var/lib/postgresql/repmgr/repmgr.conf --verbose standby promote, I get this error:
repmgr: Promoting standby
repmgr: Marking recovery done
repmgr: restarting server using pg_ctl
pg_ctl: PID file "/var/lib/postgresql/9.1/main/postmaster.pid" does not exist
Is server running?
starting server anyway
waiting for server to start....2012-09-14 08:23:43 EDT LOG: could not bind IPv4 socket: Address already in use
2012-09-14 08:23:43 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2012-09-14 08:23:43 EDT LOG: could not bind IPv6 socket: Address already in use
2012-09-14 08:23:43 EDT HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2012-09-14 08:23:43 EDT WARNING: could not create listen socket for "*"
2012-09-14 08:23:43 EDT FATAL: could not create any TCP/IP sockets
.... stopped waiting
pg_ctl: could not start server
Examine the log output.
Can't restart PostgreSQL server
Should I not be using ubuntu's initscript to start/stop postgresql? Or is there a way to configure repmgr to be more aware how postgresql is running?
Thank you very much Gabriele, I'll try it ASAP, im actually busy migrating a database from 9.1 to 9.2 with postgis. Once migrated i'll deploy repmgr on each node and try the -w parameter.
Cheers,
Alf.
El viernes, 14 de septiembre de 2012 13:00:10 UTC+2, Gabriele Bartolini escribió:
> Il 14/09/12 12:48, AFH ha scritto: > > My question is very simple and perhaps there is a previous answer, > > ¿why has to be set to 5000 the wal_keep_segments for repmgr works? > > that means to reserve 80GB free on my server disks, something > > complicated cause i could only reserve 10GB. ¿How can i do it? > That is something that can be configured. Look at the -w configuration > option. The number of WALs to be kept is strictly dependant on the > production environment where repmgr is deployed.
> You need to monitor the number of WAL files regularly produced by your > Postgres server, then make a decision. You can start with 100 for > instance (1.6GB).
> Cheers, > Gabriele
> -- > Gabriele Bartolini - 2ndQuadrant Italia > PostgreSQL Training, Services and Support > gabriele.bartol...@2ndQuadrant.it | www.2ndQuadrant.it
Alf, did you have any success with this ?
Also I'm kind of missing the point here...what option -w here are we talking about ? rempgr or postgres or...
M.
On Tuesday, 18 September 2012 09:29:36 UTC+1, AFH wrote:
> Hi,
> Thank you very much Gabriele, I'll try it ASAP, im actually busy migrating > a database from 9.1 to 9.2 with postgis. Once migrated i'll deploy repmgr > on each node and try the -w parameter.
> Cheers,
> Alf.
> El viernes, 14 de septiembre de 2012 13:00:10 UTC+2, Gabriele Bartolini > escribió:
>> Hi,
>> Il 14/09/12 12:48, AFH ha scritto: >> > My question is very simple and perhaps there is a previous answer, >> > ¿why has to be set to 5000 the wal_keep_segments for repmgr works? >> > that means to reserve 80GB free on my server disks, something >> > complicated cause i could only reserve 10GB. ¿How can i do it? >> That is something that can be configured. Look at the -w configuration >> option. The number of WALs to be kept is strictly dependant on the >> production environment where repmgr is deployed.
>> You need to monitor the number of WAL files regularly produced by your >> Postgres server, then make a decision. You can start with 100 for >> instance (1.6GB).
>> Cheers, >> Gabriele
>> -- >> Gabriele Bartolini - 2ndQuadrant Italia >> PostgreSQL Training, Services and Support >> gabriele.bartol...@2ndQuadrant.it | www.2ndQuadrant.it
On Mon, Oct 22, 2012 at 8:50 AM, Milos Gajdos <milosgajdo...@gmail.com> wrote:
> Alf, did you have any success with this ?
> Also I'm kind of missing the point here...what option -w here are we talking
> about ? rempgr or postgres or...
that is a repmgr parameter to be used in STANDBY CLONE
-- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157
On Tuesday, October 23, 2012 12:14:18 AM UTC+1, Jaime Casanova wrote:
> On Mon, Oct 22, 2012 at 8:50 AM, Milos Gajdos <milosg...@gmail.com<javascript:>> > wrote: > > Alf, did you have any success with this ? > > Also I'm kind of missing the point here...what option -w here are we > talking > > about ? rempgr or postgres or...
> that is a repmgr parameter to be used in STANDBY CLONE
On Tue, Oct 23, 2012 at 4:26 AM, Milos Gajdos <milosgajdo...@gmail.com> wrote:
> so basically this can only be done on Standby server and the master must
> always have 5000 wal files ?
no. repmgr recomendation is that the master has wal_keep_segments=5000
(in postgresql.conf), that recomendation is based on a server with
lots of writes.
some server don't need to have that big configuration or they are
constrained by disk space so they can use a lower value for
wal_keep_segments on master, but when you have wal_keep_segments <>
5000 you should inform that to repmgr using the -w option when
executing STANDBY CLONE.
-- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157
On Tuesday, October 23, 2012 2:29:36 PM UTC+1, Jaime Casanova wrote:
> On Tue, Oct 23, 2012 at 4:26 AM, Milos Gajdos <milosg...@gmail.com<javascript:>> > wrote: > > so basically this can only be done on Standby server and the master must > > always have 5000 wal files ?
> no. repmgr recomendation is that the master has wal_keep_segments=5000 > (in postgresql.conf), that recomendation is based on a server with > lots of writes.
> some server don't need to have that big configuration or they are > constrained by disk space so they can use a lower value for > wal_keep_segments on master, but when you have wal_keep_segments <> > 5000 you should inform that to repmgr using the -w option when > executing STANDBY CLONE.