From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [TODO] Track number of files ready to be archived in pg_stat_archiver |
Date: | 2014-11-18 06:20:50 |
Message-ID: | CAB7nPqQ+ERa1dpjwqJA4cve6rKS1228xoQvHzaYtT-sCwNVv1w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 18, 2014 at 5:47 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 21 August 2014 09:17, Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com> wrote:
>
>> Track number of WAL files ready to be archived in pg_stat_archiver
>
> Would it be OK to ask what the purpose of this TODO item is?
>
> pg_stat_archiver already has a column for last_archived_wal and
> last_failed_wal, so you can already work out how many files there must
> be between then and now. Perhaps that can be added directly to the
> view, to assist the user in calculating it. Reading the directory
> itself to count the file is unnecessary, except as a diagnostic.
Not sure if this holds true in a node freshly started from a base
backup with a set of WAL files, or with files manually copied by an
operator.
> Please don't take "it is a TODO item" as "generally accepeted that
> this makes sense".
On systems where the WAL archiving is slower than WAL generation at
peak time, the DBA may want to know how long is the queue of WAL files
waiting to be archived. That's IMO something we simply forgot in the
first implementation of pg_stat_archiver, and the most direct way to
know that is to count the .ready files in archive_status.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-11-18 07:36:37 | Re: [TODO] Track number of files ready to be archived in pg_stat_archiver |
Previous Message | Kouhei Kaigai | 2014-11-18 04:57:57 | Re: using custom scan nodes to prototype parallel sequential scan |