Re: start of transaction (was: Re: [PERFORM] Help with count(*))

From: Neil Conway <neilc(at)samurai(dot)com>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Will LaShell <will(at)lashell(dot)net>, Christopher Browne <cbbrowne(at)acm(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: start of transaction (was: Re: [PERFORM] Help with count(*))
Date: 2003-11-16 22:55:41
Message-ID: 873ccnc49e.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Hannu Krosing <hannu(at)tm(dot)ee> writes:
> For me, the "start of transaction" is not about time, but about grouping
> a set of statements into one. So making the exact moment of "start" be
> the first statement that actually does something with data seems
> perfectly reasonable.

This might be a perfectly logical change in semantics, but what
benefit does it provide over the old way of doing things?

What does BEGIN actually do now, from a user's perspective? At
present, it "starts a transaction block", which is pretty simple. If
we adopted the proposed change, it would "change the state of the
system so that the next command is part of a new transaction". This is
naturally more complex; but more importantly, what benefit does it
ACTUALLY provide to the user?

(I can't see one, but perhaps I'm missing something...)

> Delaying the locking effects of transactions as long as possible can
> increase performance overall, not just for pathological clients that sit
> on idle open transactions.

I agree, but this is irrelevant to the semantics of now().

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2003-11-16 23:18:02 start of transaction (was: Re: [PERFORM] Help with count(*))
Previous Message Tom Lane 2003-11-16 22:46:17 Re: [PATCHES] SRA Win32 sync() code

Browse pgsql-performance by date

  From Date Subject
Next Message Neil Conway 2003-11-16 23:18:02 start of transaction (was: Re: [PERFORM] Help with count(*))
Previous Message Dennis Bjorklund 2003-11-16 15:51:49 Re: start of transaction (was: Re: [PERFORM] Help with