pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zeugswetter Andreas <andreas.zeugswetter@telecom.at>
To: 'Michael Meskes' <meskes@topsystem.de>
Cc: 'pgsql-hackers@hub.org' <pgsql-hackers@hub.org>
Subject: AW: [HACKERS] Begin statement again
Date: Wed, 25 Mar 1998 16:28:25 +-100
Message-ID: <01BD580B.0C2E7E20@pc9358.sd.spardat.at> (raw)


>Zeugswetter Andreas writes:
>> I meant: why is a transaction always open in an ecpg program
>
>Because this is how it works with other embedded SQL systems too. I have
>done quite some work with Oracle, and it always has the transaction open.

I am well accustomed to the deficiencies of Oracle. But in Oracle you don't have read locks,
and so a read only program does no harm if it only does one commit when it exits 
(except maybe block the RBS if it did one small update).
Since postgresql does have read locks, such a program will lock all resources as time goes by,
if it does not do frequent commits. Not to speak of memory, that does not get freed.

>>
>>Keep in mind that there is no disconnect command. Instead you go out by
>>issuing a commit.

Hmmm ? you don't tell the backend when the program exits ?

> What I am saying here is, that an ecpg program should be able to run with 
> autocommit mode on.  (Michael Meskes)
>
>I tend to agree. But all embedded SQL programs I've seen so far only use
>commit. I never saw one that issues a begin work since I stopped using
>Ingres.

Try Informix, and you will love the difference and speed in these points.
The begin work statement is also a fundamental part of postgres. I simply would not hide it.

Andreas





view thread (14+ messages)  latest in thread

Message-ID: <01BD580B.0C2E7E20@pc9358.sd.spardat.at>
Permalink:  ../01BD580B.0C2E7E20@pc9358.sd.spardat.at/
Also on:    postgresql.org/message-id/01BD580B.0C2E7E20@pc9358.sd.spardat.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andreas.zeugswetter@telecom.at, meskes@topsystem.de, pgsql-hackers@hub.org
  Subject: Re: AW: [HACKERS] Begin statement again
  In-Reply-To: <01BD580B.0C2E7E20@pc9358.sd.spardat.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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