Re: Using Threads?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tom Samplonius <tom(at)sdf(dot)com>, Junfeng Zhang <junfengz(at)cae(dot)wisc(dot)edu>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Using Threads?
Date: 2000-12-09 15:18:17
Message-ID: 200012091518.KAA12665@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> There is no difference. If anything bad happens with the current
> >> multi-process server, all the postgres backends shutdown because the
> >> shared memory may be corrupted.
>
> > Yes. Are we adding reliability with per-process backends.
>
> Yes, we are: the postmaster forces a system-wide restart only if a
> backend actually coredumps, or exits with elog(STOP). If a backend
> curls up and dies with elog(FATAL), we assume it's a positive sign
> that it was able to detect the error ;-), and keep plugging.

It would be interesting to have one backend per database, and have
all threads for that database running as threads. That would remove the
startup problem, but each thread would have to have private copies of
some system tuples it modifies.

Another idea would be to have a file that holds the standard system
tuples normally loaded. These files would sit in each database, and be
read on startup. If one backend modifies one of these tuples, it can
delete the file and have the next backend recreate it. We already have
some of these for hard-wired tuples. This would improve startup time.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-12-09 15:45:33 Re:
Previous Message mlw 2000-12-09 14:28:37 Re: OK, does anyone have any better ideas?