Skip site navigation (1) Skip section navigation (2)

Re: Reasoning behind process instead of thread based

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: nd02tsk(at)student(dot)hig(dot)se
Subject: Re: Reasoning behind process instead of thread based
Date: 2004-10-28 07:41:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Tom Lane wrote:
> That argument has zilch to do with the question at hand.  If you use a
> coding style in which these things should be considered recoverable
> errors, then setting up a signal handler to recover from them works
> about the same whether the process is multi-threaded or not.  The point
> I was trying to make is that when an unrecognized trap occurs, you have
> to assume not only that the current thread of execution is a lost cause,
> but that it may have clobbered any memory it can get its hands on.
I'm just arguing that far from all signals are caused by unrecoverable 
errors and that threads causing them can be killed individually and 

I can go further and say that in some multi-threaded environments you as 
a developer don't even have the opportunity to corrupt memory. In such 
environments the recognized traps are the only ones you encounter unless 
the environment is corrupt in itself. In addition, there are a number of 
techniques that can be used to make it impossible for the threads to 
unintentionally interfere with each others memory.

I'm not at all contesting the fact that a single-threaded server 
architecture is more bug-tolerant and in some ways easier to manage. 
What I'm trying to say is that it is very possible to write even better, 
yet very reliable servers using a multi-threaded architecture and high 
quality code.

> ... The point here is circumscribing how much can go wrong before you
 > realize you're in trouble.
Ok now I do follow. With respect to my last comment about speed, I guess 
it's long overdue to kill this thread now. Let's hope the forum stays 
intact :-)

Thomas Hallgren

In response to


pgsql-general by date

Next:From: JoelDate: 2004-10-28 08:00:07
Subject: Re: compatibilityissues from 7.1 to 7.4
Previous:From: Sim ZacksDate: 2004-10-28 06:54:20
Subject: Re: Bug: 8.0 beta1 either view optimization or pgdump/pgrestore

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group