Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans
Date: 2004-08-25 22:18:26
Message-ID: 87wtzmrhe5.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> writes:

> On 25 Aug 2004, Greg Stark wrote:
>
> > It's only allowed when the transaction is in READ UNCOMMITTED isolation level.
> > Something Postgres doesn't currently support. In fact I'm not aware of any SQL
> > database that supports it, though I'm sure there's one somewhere.
>
> Looks like mysql also supports it:
>
> http://dev.mysql.com/doc/mysql/en/InnoDB_transaction_isolation.html
>
> Together with the other replies we now have a whole bunch of databases
> that implements it.

Well it would be a pretty handy feature.

Several times I've seen people on the list trying to calculate how far some
big batch update or load had proceeded by looking at the sizes of files in the
data directory, estimating row sizes, and dividing.

That's a pretty kludgy method for doing what could be done cleanly and with
more flexibility by just running switching to read uncommitted mode and
selecting to see how many records had been inserted.

I don't know the details, but with postgres's model wouldn't it be a simply
matter of treating every tuple found as having been inserting or deleted
without checking to see if the transaction id in the tuple is committed? It
should be even easier than the normal read committed mode.

One danger would be for such "dirty" data leaking out into the rest of the
database. But I would be pretty happy with such a feature even if it meant no
inserts/deletes/updates could be performed while in that mode.

--
greg

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Neil Conway 2004-08-25 22:34:13 Re: pgsql-server: Update that 8.0 will support MS Win
Previous Message Alvaro Herrera 2004-08-25 21:44:22 Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2004-08-25 22:26:28 Re: futex
Previous Message pgsql 2004-08-25 21:47:28 Re: Contrib -- PostgreSQL shared variables