Re: log_checkpoint's "0 transaction log file(s) added" is extremely misleading

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: log_checkpoint's "0 transaction log file(s) added" is extremely misleading
Date: 2016-01-27 03:17:56
Message-ID: CAHGQGwGOmPH9=LQot35h-TiEZ2P_boNqGKKU8uhES3KXfpQctw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 22, 2016 at 11:33 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On January 22, 2016 3:29:44 AM GMT+01:00, Simon Riggs <simon(at)2ndQuadrant(dot)com> wrote:
>>On 22 January 2016 at 01:12, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>
>>> Hi,
>>>
>>> While in theory correct, I think $subject is basically meaningless

What about just changing "added" to "preallocated" to avoid the confusion?

>>> because other backends may have added thousands of new segments. Yes,
>>it
>>> wasn't the checkpointer, but that's not particularly relevant
>>> imo. Additionally, afaics, it will only ever be 0 or 1.
>>>
>>
>>Even better, we could make it add >1
>
> That'd indeed be good, but I don't think it really will address my complaint: We'd still potentially create new segments outside the prealloc call. Including from within the checkpointer, when flushing WAL to be able to write out a page.

IMO it's more helpful to display such information in something like
pg_stat_walwriter view rather than checkpoint log message.

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2016-01-27 03:20:19 Re: Optimization for updating foreign tables in Postgres FDW
Previous Message Fujii Masao 2016-01-27 02:56:38 Re: brin_summarize_new_values error checking