Обсуждение: Replication Delay

Поиск
Список
Период
Сортировка

Replication Delay

От
"Bedorf, Paul"
Дата:

We have a primary and secondary postgresql server set up. Replication between the 2 works fine… just want to find if anyone knows what is the default replication delay time?
or is there a way to view the replication time it takes from primary to the secondary server?

 

Thanks

 

__________________________________________________

Paul Bedorf | Linux Administrator | Mosaic
O: 905.238.8058 x 6414 | M: 416.799.4028
mosaic.com

 

Re: Replication Delay

От
Jorge Torralba
Дата:
select now() - pg_last_xact_replay_timestamp() AS LAG_TIME;


archive_timeout (integer)

The archive_command is only invoked for completed WAL segments. Hence, if your server generates little WAL traffic (or has slack periods where it does so), there could be a long delay between the completion of a transaction and its safe recording in archive storage. To limit how old unarchived data can be, you can set archive_timeout to force the server to switch to a new WAL segment file periodically. When this parameter is greater than zero, the server will switch to a new segment file whenever this many seconds have elapsed since the last segment file switch, and there has been any database activity, including a single checkpoint. (Increasing checkpoint_timeout will reduce unnecessary checkpoints on an idle system.) Note that archived files that are closed early due to a forced switch are still the same length as completely full files. Therefore, it is unwise to use a very short archive_timeout — it will bloat your archive storage. archive_timeout settings of a minute or so are usually reasonable. This parameter can only be set in the postgresql.conf file or on the server command line.




On Mon, Jun 2, 2014 at 11:01 AM, Bedorf, Paul <Paul.Bedorf@mosaic.com> wrote:

We have a primary and secondary postgresql server set up. Replication between the 2 works fine… just want to find if anyone knows what is the default replication delay time?
or is there a way to view the replication time it takes from primary to the secondary server?

 

Thanks

 

__________________________________________________

Paul Bedorf | Linux Administrator | Mosaic
O: 905.238.8058 x 6414M: 416.799.4028
mosaic.com

 




--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential information. If you are not the intended recipient, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this email in error and delete the copy you received. Thank You.