Subject: Re: PostgreSQL
To: Greg 'groggy' Lehey <grog@NetBSD.org>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
Date: 02/02/2006 19:12:09
On Fri, 3 Feb 2006 10:17:20 +1030
Greg 'groggy' Lehey <grog@NetBSD.org> wrote:
> On Thursday, 2 February 2006 at 15:37:29 +0000, Patrick Welche wrote:
> > On Wed, Feb 01, 2006 at 06:58:04PM -0800, Alfred Perlstein wrote:
> >> * Neil Conway <email@example.com> [060201 18:49] wrote:
> >>> On Thu, 2006-02-02 at 00:49 +0000, firstname.lastname@example.org wrote:
> >> But threads aren't always the best thing out there, the code gets
> >> a lot more complicated and crash prone and you wind up sometimes
> >> getting screwed because third party code isn't thread safe...
> > Isn't your last paragraph the reason PostgreSQL sticks to processes?
> I'd guess no. It might be a good reason to do so, but the real reason
> is what I stated in a previous message: it was the only option at the
> time. And "if it works, don't fix it".
Talking to PostgreSQL core members I get the definite feeling that
splitting off a separate process was the primary goal and the fact that
it was the only way at the time is just coincidence. I am pretty sure
that it would have been done the same way today. I know that there are
some pretty serious databases that I have set up that I would never
trust to a threaded server. One program failing is bad enough. If it
takes out the entire database you might as well start standing in line
at the unemployment office now.
> > Companies A and B each have databases running from your server.
> > Company A has written flaky procedures which segfault its backends.
> > (some processes disappear) Company B doesn't care - its backends
> > don't share any memory with them, all is well.
> This is an issue, agreed. It doesn't seem to have bitten us (MySQL)
> so far, though possibly I'm not completely informed.
Possibly because the really big enterprises that would see this more
often won't run on MySQL for just that reason. As a datapoint, my ISP
(http://www.Vex.Net/) offers clients access to both databases. We give
them their own database within one or the other server, their choice.
The MySQL one is the only one that occasionally locks up on us. Both
are running on the same physical machine.
Wow, that's a lot of crossposting. I have trimmed it down to just
D'Arcy J.M. Cain <darcy@NetBSD.org>