Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?

Поиск
Список
Период
Сортировка
От libra dba
Тема Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?
Дата
Msg-id 9abe84da0802280636n499f162co8d966d1ffcb7f78e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?  (salman <salmanb@quietcaresystems.com>)
Ответы Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?  (salman <salmanb@quietcaresystems.com>)
Список pgsql-admin
Hey Salman,
 
Thanks a lot for  all your guidance and help. It has really been a great help. I appreciate your quick replies.
 
Which replication in postgres is better  ?
SLONY or WARM STANDBY (usning wal).

Another thing which haunts me is that, if we have a warm standby, the recovery process on the standby server reads an archived file only if it is 16MB, if it is small, the standby server goes down as shown
 
quote from the logfile on standby
~~~~~~~~~~~~~~~~~~~~~~~~~~
FATAL:  archive file "000000010000000100000032" has wrong size: 491520 instead of 16777216
LOG:  startup process (PID 13177) exited with exit code 1
LOG:  aborting startup due to startup process failure
LOG:  database system was interrupted while in recovery at log time 2008-02-28 00:47:39 EST

Usually, an archive file is written every minute. Now, if the last archive was written at 12:05:00, and the primary server goes down at 12:05:37, the archive is not generated for the last 37 seconds. The archive file which was written at 12:05:00 would be applied to the standby. But what will happen to transactions which happen in the last 37 seconds before the crash???
 
Do we loose that data???
 
Thanks!
 
On Wed, Feb 27, 2008 at 4:05 PM, salman <salmanb@quietcaresystems.com> wrote:


libra dba wrote:
> continuing with the postgres replication using WARM STANDBY, what happens to
> the wal_files which keeps on generating on the primary?
>
> Do we have to manually remove them or they are removed automatically, once
> they have been recovered on the warm standby?
>
> Also a quick question, do we have to have a NFS for the wal_files, which
> will be mounted on both the servers, or we can have folders on each server
> and configure DRBD between them, so that whatever happens on one is copied
> automatically on to the other.
>
> Thanks!
>

This is what I use -- may not be the best approach, but it has worked
quite well for me so far:

archive_command = 'gzip %p; rsync -av %p.gz -e \"ssh -p portNum -i
/home/postgres/.ssh/id_dsa\"
postgres@rhostname:/usr/local/postgresql/archives/recovery/%f.gz && rm
-f %p.gz'





В списке pgsql-admin по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Meaning of logs of postgresql
Следующее
От: salman
Дата:
Сообщение: Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?