Re: Some ideas about Vacuum - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Some ideas about Vacuum
Date
Msg-id 478DEE30.808@enterprisedb.com
Whole thread Raw
In response to Re: Some ideas about Vacuum  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Responses Re: Some ideas about Vacuum  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Re: Some ideas about Vacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Gokulakannan Somasundaram wrote:
>>
>> Well, one of the principal arguments for having VACUUM at all is that it
>> off-loads required maintenance effort from foreground transaction code
>> paths.  I'm not really going to be in favor of solutions that put more
>> work into the transaction code paths (HOT already did more of that than
>> I would like :-().  OTOH, I agree that scanning the WAL log doesn't
>> really sound like something well-matched to this problem either.
>>
> 
> Tom, Don't you like the idea of building some more structures around WAL,
> like Asynchronous Materialized views. Indexes, if implemented as  stated,
> would remove the HOT code in the path of the transaction(as you may know).
> I am also slightly doubtful of the argument, that doing full-table scans and
> full index scans for Vacuum is efficient. Can you please advise me on why we
> should not use a read only operation on WAL log ?

I haven't been paying close attention to this thread, but there is a 
couple general issues with using the WAL for this kind of things. First 
of all, one extremely cool feature of PostgreSQL is that transaction 
size is not limited by WAL space, unlike on many other DBMSs. I think 
many of the proposed ideas of reading WAL would require us to keep all 
WAL available back to the beginning of the oldest running transaction.

Another issue is that reading WAL is inherently not very scalable. 
There's only one WAL for the whole cluster, and it needs to be read 
sequentially, so it can easily become a bottleneck on large systems.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: Postgresql Materialized views
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: Declarative partitioning grammar