Re: Introduce MIN/MAX aggregate functions to pg_lsn

Fabrízio de Royes Mello <fabriziomello@gmail.com>

From: Fabrízio de Royes Mello <fabriziomello@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Surafel Temesgen <surafel3000@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-04T16:48:06Z
Lists: pgsql-hackers
On Thu, Jul 4, 2019 at 5:17 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, Jul 02, 2019 at 11:31:49AM -0300, Fabrízio de Royes Mello wrote:
> > New version attached.
>
> This looks in pretty good shape to me, and no objections from me to
> get those functions as the min() flavor is useful for monitoring WAL
> retention for complex deployments.
>
> Do you have a particular use-case in mind for max() one?  I can think
> of at least one case: monitoring the flush LSNs of a set of standbys
> to find out how much has been replayed at most.
>

I use min/max to measure the amount of generated WAL (diff) during some
periods based on wal position stored in some monitoring system.

Regards,

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Commits

  1. Add min() and max() aggregates for pg_lsn