Re: Report the number of skipped frozen pages by manual VACUUM

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, Jim Nasby <jim(dot)nasby(at)openscg(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Report the number of skipped frozen pages by manual VACUUM
Date: 2017-03-25 16:16:12
Message-ID: CAD21AoDpwvGK=rMrC-U5NnUeynrz+6uxv1PHmtbKD8=yTA7hKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 25, 2017 at 2:42 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Thu, Mar 23, 2017 at 4:28 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On Wed, Mar 15, 2017 at 7:51 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>> On Wed, Mar 15, 2017 at 1:09 PM, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> wrote:
>>>> On Fri, 10 Mar 2017 20:08:42 +0900
>>>> Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>>>
>>>>> On Fri, Mar 10, 2017 at 3:58 PM, Jim Nasby <jim(dot)nasby(at)openscg(dot)com> wrote:
>>>>> > On 3/6/17 8:34 PM, Masahiko Sawada wrote:
>>>>> >>
>>>>> >> I don't think it can say "1 frozen pages" because the number of
>>>>> >> skipped pages according to visibility map is always more than 32
>>>>> >> (SKIP_PAGES_THRESHOLD).
>>>>> >
>>>>> >
>>>>> > That's just an artifact of how the VM currently works. I'm not a fan of
>>>>> > cross dependencies like that unless there's a pretty good reason.
>>>>>
>>>>> Thank you for the comment.
>>>>> Agreed. Attached fixed version patch.
>>>>
>>>> It seems that it says "frozen pages" if pinskipped_pages is not zero,
>>>> rather than about frozenskipped_pages.
>>>>
>>>> How about writing as below?
>>>>
>>>> appendStringInfo(&buf, ngettext("Skipped %u page due to buffer pins, "
>>>> "Skipped %u pages due to buffer pins, ",
>>>> vacrelstats->pinskipped_pages),
>>>> vacrelstats->pinskipped_pages);
>>>> appendStringInfo(&buf, ngettext("%u frozen page.\n", "%u frozen pages.\n",
>>>> vacrelstats->frozenskipped_pages),
>>>> vacrelstats->frozenskipped_pages);
>>>>
>>>
>>> Yeah, you're right. I've attached the updated version patch
>>> incorporated your comment and fixing documentation.
>>
>> The patch looks very simple and good to me.
>> Barring objection, I will commit this.
>
> Pushed.
>

Thank you!
Actually, vacuum execution example in doc is still inconsistent with
actual output because commit 9eb344faf54a849898d9be012ddfa8204cfeb57c
added the oldest xmin to the vacuum verbose log. I mentioned another
thread[1] but it's still inconsistent.

[1] https://www.postgresql.org/message-id/CAD21AoAGA2pB3p-CWmTkxBsbkZS1bcDGBLcYVcvcDxspG_XAfA@mail.gmail.com

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rushabh Lathia 2017-03-25 16:18:13 Re: crashes due to setting max_parallel_workers=0
Previous Message Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= 2017-03-25 15:59:02 Re: PL/Python: Add cursor and execute methods to plan object