pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feednewbie : START TRANSACTION
2+ messages / 2 participants
[nested] [flat]
* newbie : START TRANSACTION
@ 2005-02-15 15:14 Zouari Fourat <fourat@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Zouari Fourat @ 2005-02-15 15:14 UTC (permalink / raw)
To: pgsql-admin
Hello
am new to transactional sql (just moved from mysql) and would like to
use transactions and i want to ask about it here, when am in a
transaction block can i execute other queries on the server (that
table exactly) or shoudl i commit the transaction to free the table ?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: newbie : START TRANSACTION
@ 2005-02-15 15:29 Scott Marlowe <smarlowe@g2switchworks.com>
parent: Zouari Fourat <fourat@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Scott Marlowe @ 2005-02-15 15:29 UTC (permalink / raw)
To: Zouari Fourat <fourat@gmail.com>; +Cc: pgsql-admin
On Tue, 2005-02-15 at 09:14, Zouari Fourat wrote:
> Hello
> am new to transactional sql (just moved from mysql) and would like to
> use transactions and i want to ask about it here, when am in a
> transaction block can i execute other queries on the server (that
> table exactly) or shoudl i commit the transaction to free the table ?
Firstly, read through this section of the manual:
http://www.postgresql.org/docs/8.0/static/mvcc.html
Secondly, postresql is designed around transactions, and generally you
don't have to worry about accidentally doing too much in one or anything
like that. This is especially true of DML (Data manipulation language)
queries.
However, transactions and DDL (data definition language) are a slightly
different story. While everything except create / drop database is
transactable, DDL statements tend to take out locks that do lock out
other users while running, and therefore should be run as a batch then
committed or not quickly, generally speaking.
Basically, as long as you're updating your data, you don't have to worry
too much about what's been locked, except for some visibility issues
(you might need select or update for some of those problems, as well as
serializable mode). When you're alter table structure and such, then it
can become an issue to other usres.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-02-15 15:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-15 15:14 newbie : START TRANSACTION Zouari Fourat <fourat@gmail.com>
2005-02-15 15:29 ` Scott Marlowe <smarlowe@g2switchworks.com>
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