| From: | Marc Tardif <admin(at)wtbwts(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | implementing a psql daemon |
| Date: | 2000-01-22 00:14:26 |
| Message-ID: | Pine.BSF.4.10.10001212356001.19785-100000@server.b0x.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I have come to like postgresql and I have written many utilities for
internal usage, mostly related to my mailing list manager. The actual
mailinst list program is written in c and opens and closes only a single
connection for each email received. The problem is mostly with the
utilities which are shell scripts using psql between 1 and 5 times per
script. Needless to say, I can expect to waste many resources if/when
traffic becomes more important.
The solution to this problem could be to write a daemon which would leave
a connection open to a postgresql database. Then, when data is needed, I
could pass the query using shared memory and perhaps semaphores to avoid
concurrent access to the daemon therefore avoiding the overhead of
creating a connection each time. I could then use this same method for my
mailing list manager and each utility (which would have to be re-written
in c) all of which would use the same connection provided by the daemon.
Unfortunately, my understanding of the subject is somewhat limited. I can
manage to write the daemon using books and sample source code, but I'm not
in a position to weigh the pros and cons of such a solution. Therefore, I
would like to sollicit your feedback to gain a better understanding of the
problem at hand.
Looking forward to your insight,
Marc
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Cory Kempf | 2000-01-22 00:32:11 | Re: trouble with the postmaster |
| Previous Message | Marc Tardif | 2000-01-21 23:10:46 | max(oid) |