Re: Isolated transactions?

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: Lexington Luthor <lexington(dot)luthor(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Isolated transactions?
Date: 2005-10-04 20:46:04
Message-ID: m24q7x2epf.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Lexington Luthor <lexington(dot)luthor(at)gmail(dot)com> writes:

> Hi,
>
> I have a number of large tables in a schema all of which are related
> by foreign keys.
>
> Now, what I would like to be able to do is run some long-running
> queries (mostly selects, but also some updates and inserts into the
> tables), to generate some reports which will eventually be
> rolled-back.
>
> Now, while this works just fine, I would like to be able to avoid
> holding other transactions back while this is happening.

In general, you won't block other transactions, unless you do explicit
locking with SELECT FOR UPDATE or LOCK TABLE. The rows you change
will simply never be seen by other transactions and will be removed by
the next VACUUM after your transaction rolls back.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message han.holl 2005-10-04 20:57:47 Re: Or selection on index versus union
Previous Message Aaron Glenn 2005-10-04 20:41:41 Re: License question[VASCL:A1077160A86]