Tue Nov 2 15:06:24 PST 2004
- Previous message: [Slony1-general] redundant setval calls
- Next message: [Slony1-general] redundant setval calls
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Nov 01, 2004 at 11:43:29PM -0600, Ed L. wrote: > Andrew is going to need to say a little more before it's clear to me he's at > all justified in calling sequence triggers a terrible idea. He mistated > the facts; sequences are NOT transactional (i.e., they're not rolled back). > Maybe that's just a typo on his part, I don't know. He seems to presume Indeed it was a typo, as the context should make clear. But since it's apparently not obvious what my objection is, let me try to make it so: if you have a trigger, it is performing an action. Now, we've already established that you don't want to grovel through a lot of data every time you replicate, or this polling issue wouldn't even be under discussion; and a sequence which was under heavy use would cause a lot of notification events. So, in any such system, you're going to have to update the notification events in some way. That entails locking, because you can't have more than one process flipping the same bit at the same time. So you have a concurrency problem. The basic objection I have is that this moves the cost of keeping track of the sequence from the asynchronous part, when we're replicating, into the main transaction line, when data is being transformed. Given my experience with erserver and now Slony, I can say that every single additional cost you impose in the main transaction line will bite you later. This is why Jan spent so much time optimising the trigger for Slony -- the goal was to impose as little overhead as possible. To me, even a modest possibility of contention on a sequence is a reason not to introduce such functionality. They're designed to be fast, and I don't want to lose that. > wants to do it, etc). But fundamentally, async notification is very likely > the answer to the polling inefficiencies in one form or another. I don't think anyone is disputing this; but a workable proposal is what's wanted, I think. I'd be delighted to be proven wrong in what's above. A -- Andrew Sullivan | ajs at crankycanuck.ca This work was visionary and imaginative, and goes to show that visionary and imaginative work need not end up well. --Dennis Ritchie
- Previous message: [Slony1-general] redundant setval calls
- Next message: [Slony1-general] redundant setval calls
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list