Re: Isolated transactions? - Mailing list pgsql-general

From Douglas McNaught
Subject Re: Isolated transactions?
Date
Msg-id m24q7x2epf.fsf@Douglas-McNaughts-Powerbook.local
Whole thread Raw
In response to Isolated transactions?  (Lexington Luthor <lexington.luthor@gmail.com>)
Responses Re: Isolated transactions?  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Lexington Luthor <lexington.luthor@gmail.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

pgsql-general by date:

Previous
From: Aaron Glenn
Date:
Subject: Re: License question[VASCL:A1077160A86]
Next
From: Michael Fuhr
Date:
Subject: Re: Or selection on index versus union