From: | Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com> |
---|---|
To: | Dawid Kuroczko <qnex42(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: background triggers? |
Date: | 2006-05-25 19:42:02 |
Message-ID: | 1148586123.20217.376.camel@model.home.waw.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2006-05-25 at 20:27 +0200, Dawid Kuroczko wrote:
> On 5/25/06, Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com> wrote:
> > Here I'm just not interested in that procedure outcome: if it eventually
> > COMMITED or ROLLED-BACK. But obviously I am interested in consistancy of
> > database, when the detached procedure COMMITS.
>
> Hmm. How are you going to get it? No, an "on ROLLBACK" trigger is not
> a good idea! :-)
good point. But no. I was just to quick with typeing. I meant 'basically
interested', that is I'd like to relay on COMMITs guaranee of consistant
database. But I don't have to see that guarantee on every COMMIT. I'd
prefere to trust the database on that.
trigger on ROLLBACK ..... now, that's bizzare.
> > I mean. It looks like this is *really* a novelty for RDBMS design - I
> > feel, that real programmers here (you guys :) are so hard to persuade
> > its necesary, because it's so far from the 'synchronous nature' of
> > clasical RDBMS design and triggers in particular.
>
> Don't get me wrong, but a word "bizzarre" is more suitable than
OK. agree :)
> You said that your scheme would implement exclusive locking.
No. never mentioned locking. Not me.
> Well, if I were writing such an application, I would rather want such
> code to be fired not more frequently than 1 minute.
> ON COMMIT DETACHED WITH MINIMUM DELAY '1 minute'::interval; ? :-)
sweet. But there are issues.
In cases when the main traffic (keep in ming a nnumerous concurent
batches of INSERTS) does not rest for a single second, the above would
probably delay the agregare UPDATES indefinitely. Which may not
neceserly be appropriate. So there should be an indication, whether to
wait for 1 minute idle-time between INSERTS (foreground/main), or 1
minute idle-time between UPDATES (background/trigger).
Still, very, very desirable.
> Actually, I like the idea of "ON COMMIT" trigger (though without the
> "DETACHED" part), but this is another story...
By now, I like it even more then the initial 1) 2) 3) 4) scenario :) ...
but the DETACHED is vital.
regards,
-R
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-25 20:06:48 | Re: reindexdb program error under PG 8.1.3 |
Previous Message | Florian G. Pflug | 2006-05-25 19:36:08 | Re: background triggers? |