Re: Plans for solving the VACUUM problem

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
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 06:01:53
Message-ID: 3B0DF551.275F382C@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Mikheev, Vadim" wrote:
>
> > > > >Oracle has MVCC?
> > > >
> > > > With restrictions, yes.
> > >
> > > What restrictions? Rollback segments size?
> > > Non-overwriting smgr can eat all disk space...
> >
> > Is'nt the same true for an overwriting smgr ? ;)
>
> 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 ?

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 ?

One thing (not having to updata non-changing index entries) can be
quite substantial under some scenarios, but there are probably ways
to at least speed up part of this by doing other compromizes, perhaps
by saving more info in index leaf (trading lookup speed for space
and insert speed) or chaining data pages (trading insert speed for
(some) space and lookup speed)

> > > > You didn't know that? Vadim did ...
> > >
> > > Didn't I mention a few times that I was
> > > inspired by Oracle? -:)
> >
> > 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.

> > Could it possibly be a Postgres-inspired bolted-on hack
> > needed for better concurrency ?
>
> -:)) Oracle has MVCC for years, probably from the beginning
> and for sure before Postgres.

In that case we can claim thet their way is more primitive ;) ;)

-----------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2001-05-25 06:08:15 Bug#98643: plpgsql SELECT INTO causes trouble when assignment impossible (fwd)
Previous Message Tom Lane 2001-05-25 05:00:42 Re: GiST index on data types that require compression