From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers. |
Date: | 2012-01-11 14:05:46 |
Message-ID: | CAHGQGwFTfgq4sqdF=QEWnH2pk-n1Kd5cKzoWNY7u6cvxdFYAaA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Sat, Dec 31, 2011 at 10:34 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Send new protocol keepalive messages to standby servers.
> Allows streaming replication users to calculate transfer latency
> and apply delay via internal functions. No external functions yet.
pq_flush_if_writable() needs to be called just after
WalSndKeepalive(). Otherwise,
keepalive packet is not sent for a while.
+static void
+ProcessWalSndrMessage(XLogRecPtr walEnd, TimestampTz sendTime)
walEnd is not used in ProcessWalSndrMessage() at all. Can't we remove it?
If yes, walEnd field in WalSndrMessage is also not used anywhere, so ISTM
we can remove it.
+ elog(DEBUG2, "sendtime %s receipttime %s replication apply delay %d
transfer latency %d",
+ timestamptz_to_str(sendTime),
+ timestamptz_to_str(lastMsgReceiptTime),
+ GetReplicationApplyDelay(),
+ GetReplicationTransferLatency());
The unit of replication apply delay and transfer latency should be in
log message.
GetReplicationApplyDelay() and GetReplicationTransferLatency() are called
whenever the standby receives the message from the master. Which might
degrade the performance of replication a bit. So we should skip the above elog
when log_message >= DEBUG2?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-01-11 15:20:24 | Re: [COMMITTERS] pgsql: Send new protocol keepalive messages to standby servers. |
Previous Message | Heikki Linnakangas | 2012-01-11 09:28:25 | pgsql: Remove useless 'needlock' argument from GetXLogInsertRecPtr. It |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2012-01-11 14:12:30 | Re: checkpoint writeback via sync_file_range |
Previous Message | Robert Haas | 2012-01-11 14:04:25 | Re: JSON for PG 9.2 |