Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 4F3C41336B42 for ; Tue, 7 Dec 2010 16:10:36 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 57784-06 for ; Tue, 7 Dec 2010 20:10:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mail.postgresql.org (Postfix) with ESMTP id 0CC38133655C for ; Tue, 7 Dec 2010 16:10:28 -0400 (AST) Received: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id 9DA1728F6DE; Tue, 7 Dec 2010 14:10:28 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh3.mail.rice.edu, auth channel Received: from mh3.mail.rice.edu ([127.0.0.1]) by mh3.mail.rice.edu (mh3.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id H3LvlndgXnMj; Tue, 7 Dec 2010 14:10:28 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh3.mail.rice.edu (Postfix) with ESMTP id 6E79428F6D6; Tue, 7 Dec 2010 14:10:28 -0600 (CST) Received: by aart.is.rice.edu (Postfix, from userid 18612) id 4B55D2D5A6; Tue, 7 Dec 2010 14:10:28 -0600 (CST) Date: Tue, 7 Dec 2010 14:10:28 -0600 From: Kenneth Marshall To: Richard Broersma Cc: Andy Colson , Justin Pitts , pgsql-performance@postgresql.org Subject: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows Message-ID: <20101207201028.GE4028@aart.is.rice.edu> References: <378e24d1e3af88a49fbbb7c4d26f441a@mail.gmail.com> <4CFE7964.80206@squeakycode.net> <4CFE8E59.2010505@squeakycode.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/90 X-Sequence-Number: 41542 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