Re: newbie : START TRANSACTION

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: newbie : START TRANSACTION
Дата
Msg-id 1108481356.11967.166.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на newbie : START TRANSACTION  (Zouari Fourat <fourat@gmail.com>)
Список 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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Zouari Fourat
Дата:
Сообщение: newbie : START TRANSACTION
Следующее
От: Dick Davies
Дата:
Сообщение: empty a database