| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| 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:54:18 |
| Message-ID: | 4790.1265680458@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> 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.
Hey, they've been in there almost a week ;-)
http://archives.postgresql.org/pgsql-committers/2010-02/msg00026.php
>> 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?
It never belonged in relcache, either. Trying to keep dynamic state
(not backed by a catalog entry) in the relcache has always been a
pretty klugy thing. smgr at least has a reasonable excuse for trying
to keep track of physical truncation events, which is the thing we need
here.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2010-02-09 01:57:44 | Re: Streaming replication in docs |
| Previous Message | Andrew McNamara | 2010-02-09 01:51:09 | Re: Confusion over Python drivers |