pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.
2+ messages / 2 participants
[nested] [flat]

* pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.
@ 2011-11-08 02:46 Robert Haas <rhaas@postgresql.org>
  2011-11-08 07:43 ` Re: pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible. Thom Brown <thom@linux.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Robert Haas @ 2011-11-08 02:46 UTC (permalink / raw)
  To: pgsql-committers

Make VACUUM avoid waiting for a cleanup lock, where possible.

In a regular VACUUM, it's OK to skip pages for which a cleanup lock
isn't immediately available; the next VACUUM will deal with them.  If
we're scanning the entire relation to advance relfrozenxid, we might
need to wait, but only if there are tuples on the page that actually
require freezing.  These changes should greatly reduce the incidence
of of vacuum processes getting "stuck".

Simon Riggs and Robert Haas

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bbb6e559c4ea0fb4c346beda76736451dc24eb4e

Modified Files
--------------
src/backend/access/heap/heapam.c  |   38 ++++++++++++++++
src/backend/commands/vacuumlazy.c |   86 +++++++++++++++++++++++++++++++++++--
src/include/access/heapam.h       |    2 +
3 files changed, 122 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.
  2011-11-08 02:46 pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible. Robert Haas <rhaas@postgresql.org>
@ 2011-11-08 07:43 ` Thom Brown <thom@linux.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Thom Brown @ 2011-11-08 07:43 UTC (permalink / raw)
  To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers

On 8 November 2011 02:46, Robert Haas <rhaas@postgresql.org> wrote:
> Make VACUUM avoid waiting for a cleanup lock, where possible.
>
> In a regular VACUUM, it's OK to skip pages for which a cleanup lock
> isn't immediately available; the next VACUUM will deal with them.  If
> we're scanning the entire relation to advance relfrozenxid, we might
> need to wait, but only if there are tuples on the page that actually
> require freezing.  These changes should greatly reduce the incidence
> of of vacuum processes getting "stuck".

Minor comment typo but a typo nonetheless:

It's OK to skip vacuuming a page, as long as its not got data

Should be:

It's OK to skip vacuuming a page, as long as it's not got data

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-11-08 07:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 02:46 pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible. Robert Haas <rhaas@postgresql.org>
2011-11-08 07:43 ` Thom Brown <thom@linux.com>

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