From: | Gabriele Bartolini <gabriele(dot)bartolini(at)2ndQuadrant(dot)it> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Support for pg_stat_archiver view |
Date: | 2014-01-04 13:01:14 |
Message-ID: | 52C8061A.5040601@2ndQuadrant.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Magnus,
Il 04/01/14 13:25, Magnus Hagander ha scritto:
> My first reaction was that exactly those two things were missing. And
> then I read your whole email :)
:)
> With those two, I think it would make much sense to have a view like
> this.
Ok, I will prepare version 2 with those.
> I'd suggest making the view on top of an SRF like pg_stat_replication
> and pg_stat_activity (for example), instead of a whole lot of separate
> function calls like the older stats views.
Ok, good idea.
> in pgarch_ArchiveDone() you seem to be increasing the m_archived_vals
> value for each call and then sending it off. And then you add that
> number in the stats collector. Isn't that going to add the wrong
> number in the end - after a while, the archiver is going to send "add
> 100" when it's just sent one file? ISTM that pgstat_recv_archiver
> should just do ++ on the value?
You are right. The purpose was to set it to 1 in ArchiveDone (I might
have missed that change), so that I can manage the failed counters in
the same way. I will fix this in version 2.
> Oh, and you need to change the format id number of the stats file.
I have not found any instruction on how to set it. I assume you are
talking about this:
PGSTAT_FILE_FORMAT_ID 0x01A5BC9B
Any suggestion is welcome.
> There's a quick review you for ;) I think it's definitely worthwhile
> with those things fixed (and a proper review, that was just a quick
> one-over)
Thanks for that. It already means a lot if you agree too it is worth it.
Ciao,
Gabriele
--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele(dot)bartolini(at)2ndQuadrant(dot)it | www.2ndQuadrant.it
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-01-04 14:10:57 | Re: Changeset Extraction Interfaces |
Previous Message | Ian Lawrence Barwick | 2014-01-04 12:39:27 | comment typo in postgres_fdw/postgres_fdw.c |