pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: pgsql-patches <pgsql-patches@postgresql.org>
Subject: Re: VACUUM Improvements - WIP Patch
Date: Tue, 01 Jul 2008 08:41:34 +0100
Message-ID: <1214898094.3845.537.camel@ebony.site> (raw)
In-Reply-To: <2e78013d0806092232h6ca15ffejcbcd24e88401308f@mail.gmail.com>
References: <2e78013d0806092232h6ca15ffejcbcd24e88401308f@mail.gmail.com>


On Tue, 2008-06-10 at 11:02 +0530, Pavan Deolasee wrote:

> In most of the cases where the old transactions quickly go away, and
> for large tables, the second scan will be very limited. In the worst
> case, we might incur the overhead of conditional waits without any
> success.

Looks good.

> - An additional boolean pg_class attribute (relvac_inprogress) is used
> to track the status of vacuum on a relation. If the attribute is true,
> either vacuum is in progress on the relation or the last vacuum did
> not complete successfully.
> 
> When VACUUM starts, it sets relvac_inprogress to true.

What happens if the last VACUUM crashed? Any negative effects? If so,
should autovac be triggered again soon to complete the failed VACUUM?

> - We can potentially update FSM at the end of first pass. This is not
> a significant issue if the second scan is very limited. But if we do
> this, we need to handle the truncate case properly.

Not sure why would we do that? What would that give? To do that you'd
need to completely redesign FSM since it assumes only one update would
take place.

> - As the patch stands, we check of old transactions at every block
> iteration. This might not be acceptable for the cases where there are
> long running transactions. We probably need some exponential gap here.

I would make vacuum_delay_point() return bool rather than void, then you
can do the check each time we do the delay by saying:

if (vacuum_delay_point())
{

Need to change VacuumCostActive so it is always active during a VACUUM,
so we do accounting even when vacuum wait is zero.


-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




view thread (17+ messages)  latest in thread

Message-ID: <1214898094.3845.537.camel@ebony.site>
Permalink:  ../1214898094.3845.537.camel@ebony.site/
Also on:    postgresql.org/message-id/1214898094.3845.537.camel@ebony.site

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-patches@postgresql.org
  Cc: simon@2ndquadrant.com, pavan.deolasee@gmail.com
  Subject: Re: VACUUM Improvements - WIP Patch
  In-Reply-To: <1214898094.3845.537.camel@ebony.site>
  References: <2e78013d0806092232h6ca15ffejcbcd24e88401308f@mail.gmail.com> <1214898094.3845.537.camel@ebony.site>

* 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