Re: Function to know last log write timestamp

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: masao(dot)fujii(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Function to know last log write timestamp
Date: 2014-08-11 01:48:07
Message-ID: 20140811.104807.1416950374660938932.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mon, Aug 11, 2014 at 9:23 AM, Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
>> We can know the LSN of last committed WAL record on primary by using
>> pg_current_xlog_location(). It seems there's no API to know the time
>> when the WAL record was created. I would like to know standby delay by
>> using pg_last_xact_replay_timestamp() and such that API.
>>
>> If there's no such a API, it would be useful to invent usch an API IMO.
>
> +1
>
> I proposed that function before, but unfortunately it failed to be applied.
> But I still think that function is useful to calculate the replication delay.
> The past discussion is
> http://www.postgresql.org/message-id/CAHGQGwF3ZjfuNEj5ka683KU5rQUBtSWtqFq7g1X0g34o+JXWBw@mail.gmail.com

I looked into the thread briefly and found Simon and Robert gave -1
for this because of performance concern. I'm not sure if it's a actual
performance penalty or not. Maybe we need to major the penalty?

However I still think that kind of API is very useful because
replication delay is one of the big DBA's concern. Why don't we have a
switch to enable the API for DBAs who think the priority is
replication delay, over small performance penalty?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-08-11 02:54:30 Re: Support for N synchronous standby servers
Previous Message Fujii Masao 2014-08-11 01:35:29 Re: Function to know last log write timestamp