Re: pgsql: Add pg_stat_archiver statistics view.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Fujii Masao <fujii(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add pg_stat_archiver statistics view.
Date: 2014-02-04 02:05:32
Message-ID: CAHGQGwGK_aVazDiCQBugc98FMyFd9dOa1r5ScsQ2XB0XqJgVzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Feb 4, 2014 at 6:20 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> Hi,
>
>
> On 2014-01-28 17:59:12 +0000, Fujii Masao wrote:
>> Add pg_stat_archiver statistics view.
>>
>> This view shows the statistics about the WAL archiver process's activity.
>>
>> Gabriele Bartolini, reviewed by Michael Paquier, refactored a bit by me.
>
> As coverity notest the following lines of code:
> if (archiver_stats->last_failed_wal == 0)
> nulls[4] = true;
> else
> values[4] = CStringGetTextDatum(archiver_stats->last_failed_wal);
> won't work as intended since last_failed_wal is an array of chars and
> thus will never be 0 (which should be NULL if so).

Thanks for the report! I found last_archived_wal has also the same
problem. Fixed.

Regards,

--
Fujii Masao

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-02-04 02:30:39 pgsql: Improve connection-failure error handling in contrib/postgres_fd
Previous Message Fujii Masao 2014-02-04 02:04:34 pgsql: Fix comparison of an array of characters with zero to compare wi