Re: Actions requiring commit

Поиск
Список
Период
Сортировка
От Lee Horowitz
Тема Re: Actions requiring commit
Дата
Msg-id 70a45e2fc6d241fed530b900e898c664.squirrel@mail.panix.com
обсуждение исходный текст
Ответ на Re: Actions requiring commit  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Actions requiring commit  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
> On Mon, Feb 15, 2010 at 5:14 PM, Lee Horowitz <leeh@panix.com> wrote:
>> My problem is that I'be been told that I can use dblink() to make a
>> second
>> connection to the same database, and then, on that second connection, do
>> an
>> insert to some table and issue a commit which will make the data in that
>> commit visible to other sessions, but NOT commit any pending data on the
>> first connection.
>>
>
> That's correct. The database server process handling the second
> connection won't know anything about the outer transaction. All it
> knows is that it received this connection with this insert and then
> was asked to commit it. The outer transaction can abort or commit and
> it won't affect the status of the insert that the dblink connection
> made.
>
> You could see some weird effects if you try to look at that newly
> inserted row in the outer transaction, but that's just because it was
> inserted after your transaction started.
>
OK, so far so good. Now, just to be clear,  are you saying in addition
that the dblink(), insert,commit stuff has to be all "in line" in the
original psql script and can't be in a pl/xxxx language?





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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Actions requiring commit
Следующее
От: Joshua Tolley
Дата:
Сообщение: Re: Dily health checks to be created in short time