Re: proposal: get oldest LSN - function

From: Kartyshov Ivan <i(dot)kartyshov(at)postgrespro(dot)ru>
To:
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: get oldest LSN - function
Date: 2016-02-28 07:40:05
Message-ID: 56D2A455.2000801@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.02.2016 16:09, Michael Paquier wrote:
> On Sat, Feb 27, 2016 at 3:52 PM, Kartyshov Ivan
> <i(dot)kartyshov(at)postgrespro(dot)ru> wrote:
>> Maybe i wasn't too accurate in terms, because I newbie, but:
>> We can get information about xlog, using big amout of support function
>> (pg_current_xlog_location(), pg_current_xlog_insert_location(),
>> pg_xlogfile_name_offset(), pg_xlogfile_name(),
>> pg_last_xlog_receive_location(), pg_last_xlog_replay_location(), ... etc)
>> they helps to get get useful information about xlog files and its content.
>> So, this patch extends this amount of functions.
>> It is useful additional tool for DBA (we can get replicationSlotMinLSN, so
>> why not in master), it can show us, if xlog replication or wal-sender is
>> working properly or indicate if replication on startup can get up to date
>> with master, or after long turnoff must be recovered from archive.
> What pg_ls_dir('pg_xlog') couldn't do here if you need to know the
> last WAL segment present on master?

Hi Michael,

It will not satisfy our purposes and our administrators for three reasons.
1) DBA set me task to get the oldest number that present in WAL, not last
2) Surely we can choose the oldest segment from list
"pg_ls_dir('pg_xlog')" of segments and calculate the first LSN by hand,
but it is not what we want to do manually.
3) Soon will be commitfest and our administrators wants to enhance their
tool case for debug with usable features.

Thank you for comment.

--
Ivan Kartyshov
Postgres Professional: www.postgrespro.com
Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-02-28 08:36:57 Re: proposal: get oldest LSN - function
Previous Message Kartyshov Ivan 2016-02-28 07:18:26 Re: proposal: get oldest LSN - function