Need help in Postgres log shipping replication

From: Jahnavi Chintakunta <Jahnavi(dot)Chintakunta(at)infotech-enterprises(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Need help in Postgres log shipping replication
Date: 2011-07-06 09:32:22
Message-ID: 6E38555CD4BF19498F17AE18FEBE59654683799A@INFHYDEXMB.corp.infotech-enterprises.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


We are having a huge database and need replication with load balancing for Postgres 9.0

We have chose Log shipping method for replication and trying out that approach.

Based on the method given for Log shipping, I have configured the following

On Master server the following parameters are set

wal_level = 'archive'
archive_mode = on
archive_command = <scp %p $STANDBYNODE:$PGARCHIVE/%f>
archive_timeout = 30

Started taking backup using :

select pg_start_backup('base backup for log shipping')

Then the data files excluding the pg_xlog are copied to the slave using rsync

rsync -cva --inplace --exclude=*pg_xlog* \${PGDATA}/ $STANDBYNODE:$PGDATA

Then the backup process is stopped using the following:

select pg_stop_backup(), current_timestamp

Recovery parameter in the slave server are set as followS

standby_mode = 'on'
restore_command = <cp $PGARCHIVE/%f %p>
archive_cleanup_command = <pg_archivecleanup $PGARCHIVE %r>
trigger_file = </tmp/postgresql.trigger.5432>

Replication is taking place. THe log in the slave server is showing that the pg_xlog files
from master server are being copied and applied.

But these files are getting copied continuously and they are not stopping.

Master is generating pg_xlog files even when there is no activity on the database.
and the slave server is continuously applying these new files depening on the time set in checkpoint_timeout parameter of the master

PGADMIN is throwing a message' Database is starting up' when trying to connect to the slave database.

When I shut down database servers on both machines, and then log into the slave server after removing the recover.conf file, then
the slave server is started with the data already replicated from master server/

But can you please let me know how the two servers can be online and still the replication continue via log shipping?

Regards
Jahnavi

________________________________
DISCLAIMER:

This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech or Mail(dot)Admin(at)infotech-enterprises(dot)com and delete the original message.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message French, Martin 2011-07-06 11:29:46 Re: adminpack installation problem
Previous Message Matej Serc 2011-07-06 08:45:49 ossp-uuid (8.4) for FreeBSD