From: ogjunk-pgjedan@yahoo.com
To: pgsql-sql@postgresql.org
Subject: READ COMMITTE without START TRANSACTION?
Date: Fri, 10 Mar 2006 17:08:55 -0800 (PST)
Message-ID: <20060311010855.4341.qmail@web50314.mail.yahoo.com> (raw)
Hello,
I need to run some SELECT queries that take a while (10+ minutes) to complete, and I'm wondering about the isolation about the results I get. More precisely, while my SELECT is running, the DB is being updated by another application, and I am wondering which, if any, data changes my SELECT will see.
Example:
If I start my SELECT at 10:00, and it finishes at 10:10, will my results include data that was inserted between 10:00 and 10:10?
Similarly, will my result include data that was updated between 10:00 and 10:10?
The same question for data that was deleted during that period.
If it matters, my SELECT runs from psql client, while concurrent inserts, updates, and deletes are executed from a separate application (webapp).
For my purposes in this case I need the SELECT to get the results that represent data right at the beginning of the query - a snapshot. I read this: http://www.postgresql.org/docs/8.1/static/transaction-iso.html and it looks like this is the default PG behaviour (READ COMMITTED)
Question:
If I do not explicitly START TRANSACTION before the SELECT, will this READ COMMITTED XA behaviour still be in effect?
Thanks,
Otis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ogjunk-pgjedan@yahoo.com
Subject: Re: READ COMMITTE without START TRANSACTION?
In-Reply-To: <20060311010855.4341.qmail@web50314.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox