From: | "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | RE: Plans for solving the VACUUM problem |
Date: | 2001-05-21 17:52:28 |
Message-ID: | 3705826352029646A3E91C53F7189E32016636@sectorbase2.sectorbase.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > We could keep share buffer lock (or add some other kind of lock)
> > untill tuple projected - after projection we need not to read data
> > for fetched tuple from shared buffer and time between fetching
> > tuple and projection is very short, so keeping lock on buffer will
> > not impact concurrency significantly.
>
> Or drop the pin on the buffer to show we no longer have a pointer to it.
This is not good for seqscans which will return to that buffer anyway.
> > Or we could register callback cleanup function with buffer so bufmgr
> > would call it when refcnt drops to 0.
>
> Hmm ... might work. There's no guarantee that the refcnt
> would drop to zero before the current backend exits, however.
> Perhaps set a flag in the shared buffer header, and the last guy
> to drop his pin is supposed to do the cleanup?
This is what I've meant - set (register) some pointer in buffer header
to cleanup function.
> But then you'd be pushing VACUUM's work into productive transactions,
> which is probably not the way to go.
Not big work - I wouldn't worry about it.
> > Two ways: hold index page lock untill heap tuple is checked
> > or (rough schema) store info in shmem (just IndexTupleData.t_tid
> > and flag) that an index tuple is used by some scan so cleaner could
> > change stored TID (get one from prev index tuple) and set flag to
> > help scan restore its current position on return.
>
> Another way is to mark the index tuple "gone but not forgotten", so to
> speak --- mark it dead without removing it. (We could know that we need
> to do that if we see someone else has a buffer pin on the index page.)
Register cleanup function just like with heap above.
> None of these seem real clean though. Needs more thought.
Vadim
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-05-21 17:54:24 | Re: Is stats update during COPY IN really a good idea? |
Previous Message | Peter Eisentraut | 2001-05-21 17:48:59 | Re: Detecting readline in configure |