Re: Order of operations in lazy_vacuum_rel

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Order of operations in lazy_vacuum_rel
Date: 2010-02-09 01:46:48
Message-ID: 20100209014648.GC4113@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Tom Lane wrote:
> >> Actually, after thinking about this some more, I realize that this code
> >> has got a significantly bigger problem than just whether it will respond
> >> to CANCEL promptly.
>
> > Err, that problem was exactly why I added the interrupt holdoff in
> > there, so if you've got a better/more invasive solution, it's very
> > welcome.
>
> Well, that's a pretty incomplete solution :-(.

Yeah, we were well aware of that :-) It solved our problem (which was
related to interrupts from autovac)

> Maybe we should do
> something about this. There wasn't any obvious solution before,
> but now that we have the nontransactional smgr-level sinval messages
> being sent on drops and truncates, it seems like tying rd_targblock
> clearing to those would fix the problem.

Hmm, sounds good, though I confess not having heard about
nontransactional sinval messages before.

> The easiest way to do that
> would involve moving rd_targblock down to the SMgrRelation struct.
> Probably rd_fsm_nblocks and rd_vm_nblocks too. Comments?

Can't say it doesn't look like a modularity violation from here --
insertion target block doesn't really belong into smgr, does it?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew McNamara 2010-02-09 01:51:09 Re: Confusion over Python drivers
Previous Message Tom Lane 2010-02-09 01:32:46 Re: Order of operations in lazy_vacuum_rel