Re: [TODO] Track number of files ready to be archived in pg_stat_archiver
От | Simon Riggs |
---|---|
Тема | Re: [TODO] Track number of files ready to be archived in pg_stat_archiver |
Дата | |
Msg-id | CA+U5nM+NqQGQh05m53rcrDBZ-R9zO3RjMGbY1h0Fn=euXTp2Jw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [TODO] Track number of files ready to be archived in pg_stat_archiver (Michael Paquier <michael.paquier@gmail.com>) |
Список | pgsql-hackers |
On 18 November 2014 06:20, Michael Paquier <michael.paquier@gmail.com> wrote: > the DBA may want to know how long is the queue of WAL files > waiting to be archived. Agreed > That's IMO something we simply forgot in the > first implementation of pg_stat_archiver That's not how it appears to me. ISTM that the information requested is already available, it just needs some minor calculations to work out how many files are required. > the most direct way to > know that is to count the .ready files in archive_status. ...my earlier point was... >> 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. As soon as we have sent the first file, we will know the queue length at any point afterwards. -- Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: