pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: New vacuum option to do only freezing
Date: Tue, 16 Apr 2019 16:00:15 -0400
Message-ID: <7519.1555444815@sss.pgh.pa.us> (raw)
In-Reply-To: <31782.1555433074@sss.pgh.pa.us>
References: <15751.1555256860@sss.pgh.pa.us>
	<CAD21AoCZpFLC-KZywkC-K7OVp0PJKey6znaukTdTv4sEdJWQNQ@mail.gmail.com>
	<CAD21AoAjw_wTZA5vxjBM7BaOTaAHdUdCSui-MtcDwYsY1p25HA@mail.gmail.com>
	<16814.1555348381@sss.pgh.pa.us>
	<CA+TgmoYJpnbk3XP2CHkzco95a-0XfpqUeCYm74mUMh2NZX5AxA@mail.gmail.com>
	<23885.1555357618@sss.pgh.pa.us>
	<CA+TgmoZu+_-q-GFgs6vwKNj-Rs7YJmPPrX+mx5_Drgvr=QZfMA@mail.gmail.com>
	<28991.1555376836@sss.pgh.pa.us>
	<CA+TgmoYVGqmuAQQ-dDK7WswQ5TGee8=A1V9z0oe44UHXm43bYA@mail.gmail.com>
	<30116.1555430496@sss.pgh.pa.us>
	<20190416161019.esqg4zj3xm3kjyxy@alap3.anarazel.de>
	<31782.1555433074@sss.pgh.pa.us>

I wrote:
> I'm thinking that we really need to upgrade vacuum's reporting totals
> so that it accounts in some more-honest way for pre-existing dead
> line pointers.  The patch as it stands has made the reporting even more
> confusing, rather than less so.

Here's a couple of ideas about that:

1. Ignore heap_page_prune's activity altogether, on the grounds that
it's just random chance that any cleanup done there was done during
VACUUM and not some preceding DML operation.  Make tups_vacuumed
be the count of dead line pointers removed.  The advantage of this
way is that tups_vacuumed would become independent of previous
non-VACUUM pruning activity, as well as preceding index-cleanup-disabled
VACUUMs.  But maybe it's hiding too much information.

2. Have heap_page_prune count, and add to tups_vacuumed, only HOT
tuples that it deleted entirely.  The action of replacing a DEAD
root tuple with a dead line pointer doesn't count for anything.
Then also add the count of dead line pointers removed to tups_vacuumed.

Approach #2 is closer to the way we've defined tups_vacuumed up to
now, but I think it'd be more realistic in cases where previous
pruning or index-cleanup-disabled vacuums have left lots of dead
line pointers.

I'm not especially wedded to either of these --- any other ideas?

			regards, tom lane





view thread (118+ messages)  latest in thread

Message-ID: <7519.1555444815@sss.pgh.pa.us>
Permalink:  ../7519.1555444815@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7519.1555444815@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, robertmhaas@gmail.com, sawada.mshk@gmail.com, horiguchi.kyotaro@lab.ntt.co.jp, bossartn@amazon.com, alvherre@2ndquadrant.com
  Subject: Re: New vacuum option to do only freezing
  In-Reply-To: <7519.1555444815@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox