Re: [ADMIN] Streaming replication and partitions

2013-05-16 Thread Joshua D. Drake
On 05/16/2013 01:36 PM, Victor Tan wrote: I am basically familiar with postgreSQL (in older incarnations) but have not really done a streaming replication (WAL) setup before. In planning for my setup, I am going to use table partitioning and tablespaces to keep things as quick as "possible". H

[ADMIN] Streaming replication and partitions

2013-05-16 Thread Victor Tan
I am basically familiar with postgreSQL (in older incarnations) but have not really done a streaming replication (WAL) setup before. In planning for my setup, I am going to use table partitioning and tablespaces to keep things as quick as "possible". However, in a streaming replication environmen

Re: [ADMIN] Streaming Replication Server Crash

2012-10-22 Thread Craig Ringer
On 10/23/2012 01:03 PM, Craig Ringer wrote: > http://stackoverflow.com/questions/6403803/how-to-get-backtrace-function-line-number-on-solaris Actually, that link doesn't apply to this problem, it's for getting a stack trace programmatically: Try: http://publib.boulder.ibm.com/httpserv/ihsdiag/ge

[ADMIN] Streaming Replication (Master Delta Sync)

2012-10-19 Thread Parkirat Bagga
Hi We are using streaming replication for c++ Postgres-9.1 server. We have setup 1 master and 1 slave and streaming replication is working fine. On checking the x-log status for both master and slave, we observed that the master is quite ahead of the slave all the time. Now we have 2 questions

[ADMIN] Streaming Replication Server Crash

2012-10-19 Thread raghu ram
Hi All, We have configured Streaming Replication b/w Primary and Standby server and Pgpool-II load balancing module diverting SELECT statements to Standby server. As per our observations, Standby server crashed during peak hours on today and error message as follows: 2012-10-19 12:26:43 IST [119

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-18 Thread Albe Laurenz
Parkirat Bagga wrote: > What, I have observed that there is always only one sender process sending > the data. Is it possible with any configuration that I can optimize this > system for more current and less overhead on master. We are not thinking > in-terms of long running queries. Replication c

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-18 Thread Parkirat Bagga
Thanks Albe. For the delay between 2 machines, the data insertions is happening at 8K tps and each record is around 1KB. So a total of 8Mb/s of data is getting inserted in the Master PG. The slave is not in different region but in different availability zone (same region) on EC2. Sorry for the ty

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-18 Thread Albe Laurenz
Lonni J Friedman wrote: >> Does rsysc sync's the partial logs as well. As I would be doing the rsync >> from old master to new master (when the old master recovers), there might be >> some partial logs present in the old master? > > I don't think that's how WAL works. The log is either complete,

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-17 Thread Parkirat Bagga
Thanks for the clarifications. For the slow link path, we don't have much option as the data transfer happens over the internet. I was trying to figure out the ways to reduce the gap as less as possible, for which I have read somewhere that we should have a sufficient value for max_wal_sender, an

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-17 Thread Lonni J Friedman
On Wed, Oct 17, 2012 at 2:01 PM, Parkirat Bagga wrote: > Thanks Netllama for the reply. > > Does rsysc sync's the partial logs as well. As I would be doing the rsync > from old master to new master (when the old master recovers), there might be > some partial logs present in the old master? I don

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-17 Thread Parkirat Bagga
Thanks Netllama for the reply. Does rsysc sync's the partial logs as well. As I would be doing the rsync from old master to new master (when the old master recovers), there might be some partial logs present in the old master? Delay is there because both the machines are on cloud and they are in

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-17 Thread Lonni J Friedman
On Wed, Oct 17, 2012 at 1:34 PM, Parkirat Bagga wrote: > Hi > > We are using streaming replication for c++ Postgres-9.1 server. > > We have setup 1 master and 1 slave and streaming replication is working > fine. > > On checking the x-log status for both master and slave, we observed that the > mas

Re: [ADMIN] Streaming Replication (Master Delta Sync)

2012-10-17 Thread Parkirat Bagga
Also, does the start or fast failover based on the content of trigger file apply to Steaming replication as well? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Streaming-Replication-Master-Delta-Sync-tp5728704p5728706.html Sent from the PostgreSQL - admin mailing list

[ADMIN] Streaming Replication (Master Delta Sync)

2012-10-17 Thread Parkirat Bagga
Hi We are using streaming replication for c++ Postgres-9.1 server. We have setup 1 master and 1 slave and streaming replication is working fine. On checking the x-log status for both master and slave, we observed that the master is quite ahead of the slave all the time. Now we have 2 questions

Re: [ADMIN] Streaming replication failover with 3 servers

2012-08-09 Thread Sergey Konoplev
Hi, Below is the process I use. On Wed, Aug 8, 2012 at 7:51 PM, Stuart Bishop wrote: > I'm trying to work out failover and disaster recovery procedures for a > cluster of three servers. Streaming replication is being used with a high > wal_keep_segments, no log shipping is happening. I need to a

[ADMIN] Streaming replication failover with 3 servers

2012-08-08 Thread Stuart Bishop
Hi. I'm trying to work out failover and disaster recovery procedures for a cluster of three servers. Streaming replication is being used with a high wal_keep_segments, no log shipping is happening. I need to avoid the several hours it takes to rebuild a hot standby from scratch. ServerA is the ma

Re: [ADMIN] Streaming Replication Hooks

2012-03-15 Thread Sergey Konoplev
Probably you will find pg_last_xact_replay_timestamp() interesting. It returns the timestamp of the last transaction (when the transaction was commited) that was replayed on slave. http://www.postgresql.org/docs/9.1/static/functions-admin.html#FUNCTIONS-RECOVERY-INFO-TABLE On Wed, Mar 14, 2012 at

[ADMIN] Streaming Replication Hooks

2012-03-15 Thread David Fennell
Hi All, I hope this is the correct mailing list to ask this question. We are setting up a system using postgresql 9.1 and streaming replication to copy reference data from a single central location to several remote sites. The database changes will come in clumps with long periods of no activity

Re: [ADMIN] streaming replication

2011-11-30 Thread senthilnathan
Just check the following thread for more details: http://postgresql.1045698.n5.nabble.com/Timeline-Conflict-td4657611.html > We have system(Cluster) with Master replicating to 2 stand by servers. > > i.e > > M |---> S1 > > |---> S2 > > If master failed, we do a trigger file at S1 to

Re: [ADMIN] streaming replication

2011-11-07 Thread Alex Lai
Fujii Masao wrote: On Wed, Nov 2, 2011 at 4:48 PM, Karuna Karpe wrote: But I want huge amount of data in database. so it is take so much to take dump from slave db and load in master db. for example :- I have one master db server with 20GB of data and two slave db server are replicat

Re: [ADMIN] streaming replication

2011-11-07 Thread Kevin Grittner
Scott Ribe wrote: > On Nov 7, 2011, at 10:36 AM, Kevin Grittner wrote: > >> Perhaps this is an unexpected learning opportunity for me. If >> there is no daemon running on the other end, what creates the >> remote checksums? > > rsync--it invokes rsync on the other end by default. Empirically

Re: [ADMIN] streaming replication

2011-11-07 Thread Scott Ribe
On Nov 7, 2011, at 10:36 AM, Kevin Grittner wrote: > Perhaps this is an unexpected learning opportunity for me. If there > is no daemon running on the other end, what creates the remote > checksums? rsync--it invokes rsync on the other end by default. -- Scott Ribe scott_r...@elevated-dev.com

Re: [ADMIN] streaming replication

2011-11-07 Thread Kevin Grittner
Scott Ribe wrote: > ??? The normal way of using will using rolling checksums rather > than sending all the data over the network: > > rsync -av rsync-user@host:/source /dest Perhaps this is an unexpected learning opportunity for me. If there is no daemon running on the other end, what create

Re: [ADMIN] streaming replication

2011-11-07 Thread Scott Ribe
On Nov 7, 2011, at 10:10 AM, Kevin Grittner wrote: > If the bottleneck is the network, be sure that you are using a > daemon on the remote side; otherwise you do drag all the data over > the wire for any file which doesn't have an identical timestamp and > size. An example of how to do that from

Re: [ADMIN] streaming replication

2011-11-07 Thread Kevin Grittner
Alex Lai wrote: > Fujii Masao wrote: >> What about using rsync to take a base backup from new master and >> load it onto old master? rsync can reduce the backup time by >> sending only differences between those two servers. > My postgres instance has two databases. The pg_dump size is about > 3

Re: [ADMIN] streaming replication

2011-11-07 Thread Scott Ribe
On Nov 7, 2011, at 9:13 AM, Alex Lai wrote: > Rsync the entire $PGDATA take about an hour to a empty directory. When I > rsync the $PGDATA to the existing directory, it still take 50 minutes. 1) How slow is your disk? (Rsync computer to computer across the network should actually be faster if

Re: [ADMIN] streaming replication

2011-11-03 Thread Fujii Masao
On Wed, Nov 2, 2011 at 4:48 PM, Karuna Karpe wrote: > But I want huge amount of data in database. so it is take so much to take > dump from slave db and load in master db. > for example :- >         I have one master db server with 20GB of data and two slave db > server are replicated from master

Re: [ADMIN] streaming replication

2011-11-02 Thread Karuna Karpe
But I want huge amount of data in database. so it is take so much to take dump from slave db and load in master db. for example :- I have one master db server with 20GB of data and two slave db server are replicated from master server. when my master db server is fail, then one of slave s

Re: [ADMIN] streaming replication

2011-11-01 Thread Vinay
Dear Karuna, Its one way replication streaming ie Master to Slave. Once failed master DB is up, you need to reconfigure the replication streaming. Before that you need to take the updated dump of slave db and load in master db. Hope this information is useful. Vinay On Tue, Nov 1, 2011 at 5:10

[ADMIN] streaming replication

2011-11-01 Thread Karuna Karpe
Hello, I am replicating master server to slave server using streaming replication. I want to know that, when my master server is failed and my slave server become master server with adding some additional data into database and after some time failed master server is up then how will i re

Re: [ADMIN] streaming replication and wraparound vacuuming

2011-10-04 Thread Greg Smith
On 09/30/2011 12:28 PM, Andrew Shved wrote: I have a set up where most of the data located in partitions of the large table and that data never changes. The only table that really changes is current day's partition. The problem is that transaction wraparound vacuum generates a lot of traffi

[ADMIN] streaming replication and wraparound vacuuming

2011-10-01 Thread Andrew Shved
I have a set up where most of the data located in partitions of the large table and that data never changes. The only table that really changes is current day's partition. The problem is that transaction wraparound vacuum generates a lot of traffic quite frequently on partitions that never cha

[ADMIN] streaming replication questions

2011-08-11 Thread Lonni J Friedman
I've got three Linux systems (each with Fedora15-x86_64 running PostgreSQL-9.0.4). I'm attempting to get a basic streaming replication setup going with one master & two standby servers. At this point, the replication portion appears to be working. I can run an 'update' statement on the master, a

Re: [ADMIN] Streaming replication between x86 and x86_64 hosts

2011-08-09 Thread Raghavendra
Nope. SR supports with the same file-system architecture between Master and Slave. --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Thu, Aug 4, 2011 at 7:38 PM, pawcyk wrote: > Hi, > > I'm trying set up streaming replication between two different archite

[ADMIN] Streaming replication between x86 and x86_64 hosts

2011-08-09 Thread pawcyk
Hi, I'm trying set up streaming replication between two different architecture x86 (master) and x86_64 (slave). I fallowed guide http://wiki.postgresql.org/wiki/Streaming_Replication and stuck after copy data directory from master to slave. When I'm trying run postgres on slave I'm getting fallowi

Re: [ADMIN] Streaming replication status and fail over questions

2011-06-09 Thread Greg Smith
Michael Holt wrote: 1) I've seen things about using pg_current_xlog_location(), pg_last_xlog_replay_location(), pg_last_xlog_receive_location() to check replication status, but how can this tell me either the time lag or actual query lag? Do I need to wait for 9.1 and it's replication monitori

Re: [ADMIN] Streaming replication status and fail over questions

2011-06-03 Thread Guillaume Lelarge
On Fri, 2011-06-03 at 11:07 -0700, Michael Holt wrote: > I'm investigating moving from slony to streaming replication as we > plan some upgrades from 8.x versions of postgres to 9. I've managed to > get it working but there's a couple questions I've been unable to find > answers to so far. > > 1)

[ADMIN] Streaming replication status and fail over questions

2011-06-03 Thread Michael Holt
I'm investigating moving from slony to streaming replication as we plan some upgrades from 8.x versions of postgres to 9. I've managed to get it working but there's a couple questions I've been unable to find answers to so far. 1) I've seen things about using pg_current_xlog_location(), pg_last_xl

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-20 Thread rudi
On 04/20/2011 10:26 AM, rudi wrote: Database cluster state: in archive recovery and doesn't accept connections: 2011-04-20 10:17:00 CEST:[local]:u@postgres:[13099] FATAL: the database system is starting up even if is a hot standby. My fault: it seems I forgot to stop the backup in my previou

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-20 Thread rudi
On 04/19/2011 05:29 PM, rudi wrote: $ psql -c "SELECT pg_start_backup('switchover base backup')" $ rsync -av /var/lib/postgresql/9.0/main/ --delete --exclude server.crt --exclude server.key --exclude recovery.* --exclude postmaster.pid --exclude archive $FORMER_MASTER_ADDRESS:/var/lib/postgresql/

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-19 Thread rudi
On 04/19/2011 02:11 PM, Ray Stell wrote: On Tue, Apr 19, 2011 at 11:16:08AM +0200, rudi wrote: On 04/19/2011 10:09 AM, Gerhard Hintermayer wrote: So you keep the old pg_xlog the admin book says to exclude old pg_xlog Which book is this? So I guess something like this (from new master to fo

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-19 Thread Ray Stell
On Tue, Apr 19, 2011 at 11:16:08AM +0200, rudi wrote: > On 04/19/2011 10:09 AM, Gerhard Hintermayer wrote: > So you keep the old pg_xlog the admin book says to exclude old pg_xlog -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-19 Thread Gerhard Hintermayer
I also streaming replication _and_ ship WALs them to the slaves, something like: restore_command='rsync -pog master::postgresql-wals/%f %p', so normally the slaves are up to date (via streaming replication) and the WALs are also on the slaves to be able to recover (maybe to some PIT) from them in c

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-19 Thread rudi
On 04/19/2011 10:09 AM, Gerhard Hintermayer wrote: assuming you have configured rsyncd on the server as: [postgresql-data] uid = postgres path = /var/lib/postgresql/9.0/data comment = PostgreSQL 9.0 data dir exclude = postmaster.log pg_xlog/* postmaster.pid postgresql.conf

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-19 Thread Gerhard Hintermayer
Hi, I do rsync -a --delete new_primary_server::postgresql-data/ /var/lib/postgresql/9.0/data/ Take care to use -a, I had -r and wondered, why the rsync took so long, despite the data was nearly the same. assuming you have configured rsyncd on the server as: [postgresql-data] uid = postgres

[ADMIN] Streaming replication: rsync to switchover

2011-04-19 Thread rd
Hi, I've setup streaming replication + file-based log-shipping, with a hot-standby. Everything's good, except I don't know which is the correct way to sync the once-master db with the newly promoted master after a switchover, 1) I shutdown the master and touch the trigger_file on the slave.

Re: [GENERAL] [ADMIN] Streaming Replication limitations

2011-04-14 Thread Jeff Davis
On Wed, 2011-04-13 at 14:42 -0400, Tom Lane wrote: > Simon Riggs writes: > > 2011/4/13 Tom Lane : > >> Short answer is to test the case you have in mind and see. > > > That's the long answer, not least because the absence of a failure in > > a test is not conclusive proof that it won't fail at so

Re: [ADMIN] Streaming Replication limitations

2011-04-13 Thread Tom Lane
Simon Riggs writes: > 2011/4/13 Tom Lane : >> Short answer is to test the case you have in mind and see. > That's the long answer, not least because the absence of a failure in > a test is not conclusive proof that it won't fail at some point in the > future while in production. Not really. Eve

Re: [ADMIN] Streaming Replication limitations

2011-04-13 Thread Simon Riggs
2011/4/13 Tom Lane : > Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= writes: >> On Wed, 2011-04-13 at 23:23 +0530, raghu ram wrote: >>> Is there any limitations to configure streaming replication between >>> different operating systems i.e solaris 64 bit to RHEL 64 bit. > >> It won't work. > > As long as it'

Re: [ADMIN] Streaming Replication limitations

2011-04-13 Thread AShved
] Streaming Replication limitations Sent by: pgsql-admin-ow...@postgresql.org Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= writes: > On Wed, 2011-04-13 at 23:23 +0530, raghu ram wrote: >> Is there any limitations to configure streaming replication between >> different operating systems i.e

Re: [ADMIN] Streaming Replication limitations

2011-04-13 Thread AShved
Lane To: Devrim GÜNDÜZ Cc: raghu ram , pgsql-admin@postgresql.org, pgsql-gene...@postgresql.org Date: 04/13/2011 02:14 PM Subject: Re: [ADMIN] Streaming Replication limitations Sent by: pgsql-admin-ow...@postgresql.org Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= writes: > On Wed, 2011-04-13 at 23

Re: [ADMIN] Streaming Replication limitations

2011-04-13 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= writes: > On Wed, 2011-04-13 at 23:23 +0530, raghu ram wrote: >> Is there any limitations to configure streaming replication between >> different operating systems i.e solaris 64 bit to RHEL 64 bit. > It won't work. As long as it's the same machine architectur

Re: [ADMIN] Streaming Replication limitations

2011-04-13 Thread Devrim GÜNDÜZ
Hi, On Wed, 2011-04-13 at 23:23 +0530, raghu ram wrote: > Is there any limitations to configure streaming replication between > different operating systems i.e solaris 64 bit to RHEL 64 bit. It won't work. Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enter

[ADMIN] Streaming Replication limitations

2011-04-13 Thread raghu ram
Hi, Is there any limitations to configure streaming replication between different operating systems i.e solaris 64 bit to RHEL 64 bit. --Raghu Ram

[ADMIN] Streaming replication and Timelines

2011-02-25 Thread Serge Dubrouski
Hello - I'm trying to implement Streaming replication with several Hot-Standby servers and floating IP for the Master Server. I mean when Master server fails IP gets switched to the new Master and all standby servers start receiving log data from the new Master. My problem though is timelines. Whe