RE: Plans for solving the VACUUM problem

From: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
To: "'Hannu Krosing'" <hannu(at)tm(dot)ee>
Cc: "'Don Baccus'" <dhogaza(at)pacifier(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "'Zeugswetter Andreas SB'" <ZeugswetterA(at)wien(dot)spardat(dot)at>, The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: RE: Plans for solving the VACUUM problem
Date: 2001-05-25 17:52:17
Message-ID: 3705826352029646A3E91C53F7189E32016658@sectorbase2.sectorbase.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Removing dead records from rollback segments should
> > be faster than from datafiles.
>
> Is it for better locality or are they stored in a different way ?

Locality - all dead data would be localized in one place.

> Do you think that there is some fundamental performance advantage
> in making a copy to rollback segment and then deleting it from
> there vs. reusing space in datafiles ?

As it showed by WAL additional writes don't mean worse performance.
As for deleting from RS (rollback segment) - we could remove or reuse
RS files as whole.

> > > How does it do MVCC with an overwriting storage manager ?
> >
> > 1. System Change Number (SCN) is used: system increments it
> > on each transaction commit.
> > 2. When scan meets data block with SCN > SCN as it was when
> > query/transaction started, old block image is restored
> > using rollback segments.
>
> You mean it is restored in session that is running the transaction ?
>
> I guess thet it could be slower than our current way of doing it.

Yes, for older transactions which *really* need in *particular*
old data, but not for newer ones. Look - now transactions have to read
dead data again and again, even if some of them (newer) need not to see
those data at all, and we keep dead data as long as required for other
old transactions *just for the case* they will look there.
But who knows?! Maybe those old transactions will not read from table
with big amount of dead data at all! So - why keep dead data in datafiles
for long time? This obviously affects overall system performance.

Vadim

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2001-05-25 18:47:38 Re: plpgsql update bug?
Previous Message Mikheev, Vadim 2001-05-25 17:05:31 RE: Plans for solving the VACUUM problem