Subject: Re: PostgreSQL
To: None <tech-perform@NetBSD.org, tech-misc@NetBSD.org,>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-misc
Date: 02/03/2006 10:28:10
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I think it comes down to: THREADING IS HARD
WAY too many people try to write threaded code and fail.
As a example, look at gnokii. It used to run fine on NetBSD, then it
grew threading, and stopped working.
Why? So that morons could write:
while(1) {
if(dtr is true) break;
}
(I haven't tried to run it on NetBSD in three years. I suspect it has
gotten better)
Writing good multithreaded user-space code is really *HARDER* than
writing kernel code. If you think about this, you realize why
"professional" application code is often so crappy, huge, bloated,
buggy.
Leaning to write co-routines and select/poll interfaces is takes a bit
more brain power at first than writing the above busy-loop, but is SO
MUCH easier to debug that the effort pays off.
I think that the postgresql people know this.
- --
] ON HUMILITY: to err is human. To moo, bovine. | firewalls [
] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[
] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Finger me for keys
iQEVAwUBQ+N2iYCLcPvd0N1lAQJ7dggApYOmg4IRAGqxMOvDyXWewLHuMKa7zI9E
jenKtzLPRM7Ioky2jaVYJbULtEwXJb+ctDjpYpx82VuYCucsZ1K6YTEvWEgiqPxe
JygdNaZ9gctnJZg8ul8VSuvpi4xvc69wBHNJ/lOVq/xzsvW2HRLEcnsfQX1Kuz0w
OZGGzZy8pHg3tetaYRG07GtE+joUnQD4fpqiTrtrskTlZlCj7OtqiLQcKvmmi/DK
bceNTzNHoQPA7x+72SrTx8FVFVaQxOSbQIbj9e+2tD1jlnPEZGBNfita6uMadagZ
zTqttLsUWErDckyX6iShFY4/PdY4RsoIaAY3IAXB5yuQ1/D52aXGNw==
=j3gP
-----END PGP SIGNATURE-----