Re: Multiple Xids in PGPROC?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Multiple Xids in PGPROC?
Date: 2004-05-05 04:49:10
Message-ID: 874qqvxyux.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:

> > I hope not, because for many of us there will be as many (if not more)
> > subtransactions than standard transactions.
>
> How can that possibly be true? Every statement executed in postgres is a
> "transaction" how many subtransactions are really needed and how can they be
> as common as normal transactions?

Well consider that one thing discussed on this list previously was using
subtransactions to handle being able to continue after an error in a query.

Then any situation where autocommit was off would have every single query
being executed in a subtransaction within the main transaction. So a psql
script would likely be a single big transaction but every statement in it a
subtransaction. Or a web application could treat every page request as a
single atomic transaction but every individual query would automatically be a
subtransaction.

This would let a user C-c a large query and try a different way of writing it
without having to restart the whole sequence of commands in the transaction.
Or even simply correct a typo which is the big annoyance everyone's always
complaining about.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-05-05 05:27:09 Re: pgsql-server/ oc/src/sgml/ref/alter_table.sgml ...
Previous Message Tom Lane 2004-05-05 04:48:48 pgsql-server/ oc/src/sgml/ref/alter_table.sgml ...