Re: Vacuum DB in Postgres Vs similar concept in other RDBMS

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuum DB in Postgres Vs similar concept in other RDBMS
Date: 2007-05-24 00:33:42
Message-ID: 4654DD66.6010407@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/23/07 19:17, Chris Browne wrote:
> harpreet(dot)dhaliwal01(at)gmail(dot)com ("Harpreet Dhaliwal") writes:
>> I was just wondering if Vacuum Db in postgresql is somehow superior
>> to the ones that we have in other RDBMS.
>
> The thing that is more akin to VACUUM, in Oracle's case, is the
> rollback segment. In Oracle, Rollback segments are areas in your
> database which are used to temporarily save the previous values when
> some updates are going on.
>
> In the case of Oracle, if a transaction rolls back, it has to go and
> do some work to clean up after the dead transaction.
>
> This is not *exactly* like PostgreSQL's notion of vacuuming, but
> that's the nearest equivalent that Oracle has.

That's the only other way to do it, no?

(Rdb/VMS has dynamically-created [made when a process attaches to
the db] Recovery Unit Journal files that store the record before-
images.)

> The Oracle InnoDB product also has the notion of rollback segments; if
> you use InnoDB tables with MySQL, the rollback functionality has much
> the same behaviour as Oracle.
>
> Note that in the case of PostgreSQL, the MVCC behaviour (which
> requires VACUUMing) has the merit that COMMIT and ROLLBACK both have
> near-zero costs; in either case, the cost is merely to mark the
> transaction as either committed or failed. Data doesn't have to be
> touched at time of COMMIT/ROLLBACK; any costs that need to be paid are
> deferred to VACUUM time.

So it's not "near-zero cost", it's "deferred cost".

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVN1mS9HxQb37XmcRAsNbAJ9hgkDpUQGVR1yxb2WrpP/m3U36eQCghv7d
9FWyD8TbSOxXiaa0e8lK5/4=
=W63C
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Fitzpatrick 2007-05-24 00:57:43 Re: Searching data across tables, some large
Previous Message Joris Dobbelsteen 2007-05-24 00:29:06 Re: Delete with subquery deleting all records