Skip site navigation (1) Skip section navigation (2)

Re: 9.3 feature proposal: vacuumdb -j #

From: Jim Nasby <jim(at)nasby(dot)net>
To: Christopher Browne <cbbrowne(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.3 feature proposal: vacuumdb -j #
Date: 2012-01-18 00:09:53
Message-ID: B6107D76-1824-400C-ADC9-F01AA1D19E7A@nasby.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Jan 13, 2012, at 4:15 PM, Christopher Browne wrote:
> Have two logical tasks:
> a) A process that manages the list, and
> b) Child processes doing vacuums.
> 
> Each time a child completes a table, it asks the parent for another one.

There is also a middle ground, because having the the scheduling process sounds like a lot more work than what Josh was proposing.

CREATE TEMP SEQUENCE s;
SELECT relname, s mod <number of backends> AS backend_number
  FROM ( SELECT relname
           FROM pg_class
           ORDER BY relpages
);

Of course, having an actual scheduling process is most likely the most efficient.
--
Jim C. Nasby, Database Architect                   jim(at)nasby(dot)net
512.569.9461 (cell)                         http://jim.nasby.net



In response to

Responses

pgsql-hackers by date

Next:From: Jim NasbyDate: 2012-01-18 00:21:57
Subject: Re: Group commit, revised
Previous:From: Jim NasbyDate: 2012-01-17 22:59:06
Subject: Re: how to create a non-inherited CHECK constraint in CREATE TABLE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group