Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows

От: Andy Colson
Тема: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows
Дата: ,
Msg-id: 4CFE97B4.8090708@squeakycode.net
(см: обсуждение, исходный текст)
Ответ на: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Kenneth Marshall)
Ответы: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Tom Polak)
Список: pgsql-performance

Скрыть дерево обсуждения

Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Tom Polak, )
 Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  ("Kevin Grittner", )
 Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Andy Colson, )
 Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Andres Freund, )
 Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Craig James, )
 Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Andy Colson, )
  Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Richard Broersma, )
   Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Kenneth Marshall, )
    Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Andy Colson, )
     Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Tom Polak, )
      Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Craig James, )
      Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Gary Doades, )
      Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  ("Kevin Grittner", )
      Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  ("Pierre C", )
       Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Tom Polak, )
        Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Craig James, )
         Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Scott Marlowe, )
          Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Gael Le Mignot, )
           Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Scott Marlowe, )
           Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  ("Pierre C", )
        Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Richard Broersma, )
         Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Justin Pitts, )
        Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Rob Wultsch, )
        Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Robert Haas, )
         Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Andy Colson, )
         Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Tom Polak, )
          Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Robert Haas, )
        Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Andy Colson, )
  Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Gary Doades, )
 Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows  (Mladen Gogala, )

On 12/7/2010 2:10 PM, Kenneth Marshall wrote:
> On Tue, Dec 07, 2010 at 11:56:51AM -0800, Richard Broersma wrote:
>> On Tue, Dec 7, 2010 at 11:43 AM, Andy Colson<>  wrote:
>>
>>> In PG the first statement you fire off (like an "insert into" for example)
>>> will start a transaction. ?If you dont commit before you disconnect that
>>> transaction will be rolled back. ?Even worse, if your program does not
>>> commit, but keeps the connection to the db open, the transaction will stay
>>> open too.
>>
>> Huh - is this new?  I always thought that every statement was wrapped
>> in its own transaction unless you explicitly start your own.  So you
>> shouldn't need to commit before closing a connection if you never
>> opened a transaction to begin with.
>>
>>
>> --
>> Regards,
>> Richard Broersma Jr.
>>
>
> The default of autocommit unless explicitly starting a transaction with
> BEGIN is the normal behavior that I have seen as well.
>
> Cheers,
> Ken

Crikey!  You're right.  I need to be more careful with my assumptions.

I maintain that people need to be more careful with pg transactions.
I've seen several posts about "idle in transaction".  But its not as bad
as I made out.  My confusion comes from the library I use to hit PG,
which fires off a "begin" for me, and if I dont explicitly commit, it
gets rolled back.

sorry, it was confused between framework and PG.

-Andy


В списке pgsql-performance по дате сообщения:

От: Ivan Voras
Дата:
Сообщение: Re: Performance under contention
От: Robert Haas
Дата:
Сообщение: Re: Performance under contention