Re: PostgreSQL 8.0 Feature List?

From: Richard Welty <rwelty(at)averillpark(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.0 Feature List?
Date: 2004-08-14 18:27:52
Message-ID: Mahogany-0.66.0-2268-20040814-142752.00@averillpark.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 14 Aug 2004 12:03:21 -0400 Jan Wieck <JanWieck(at)Yahoo(dot)com> wrote:

> On 8/12/2004 8:53 PM, Richard Welty wrote:

> > On Thu, 12 Aug 2004 14:36:13 -0400 Vivek Khera <khera(at)kcilink(dot)com> wrote:
> >> >>>>> "RW" == Richard Welty <rwelty(at)averillpark(dot)net> writes:
> >> RW> i'm quite experienced in C and Java, so it's going to be in one of
> >> RW> those two. any comments from anyone on the language choice?
> >
> >> eRServer is written in Java. It sucks up about 200Mb+ virtual memory
> >> for a teeny-tiny little database. I'd avoid java :-)
> >
> > java often sucks up too much memory. java doesn't have to suck
> > up too much memory, it just usually gets written that way.

> Right. The garbage collection automatically taking care of unreferenced
> objects as a stop-gap for resource leakage is abused by lazy programmers
> as a general purpose cleanup mechanism.

some of it is this, certainly. some of it is bad education.

i was a professional lisp programmer for some 10+ years. lisp, of
course, has the ancestral garbage collection scheme, and the
lisp garbage collectors at this juncture are very, very, very good,
much more mature than java's garbage collector. nonetheless,
lisp programmers who understand what is going on are exceedingly
careful not to taunt the garbage collector if they want their app to
go fast.

the authors of 98%-99% of all introductory java textbooks have
a lot to answer for. my favorite example of the lot is that
they all teach programmers to use String in the following manner:

String query
= "SELECT foo "
+ "FROM bar "
+ "WHERE baz = 'bletch';"

return query;

nowhere do these books ever mention StringBuffer. now java
programmers who have developed a sufficient clue set know that
String is hopelessly inefficient and will instead write the much
preferable:

StringBuffer query = new StringBuffer();

query.append( "SELECT foo ");
query.append( "FROM bar ");
query.append( "WHERE baz = 'bletch';"

return new String( query);

which not only is much more efficient, but Does Not
Taunt The Garbage Collector.

i kind of like _Practical Java_ (Peter Haggar, Addison Wesley)
for its coverage of these details, as well as _Bitter Java_
(Bruce Tate, Manning) for its discussion of how naive programmers
writing Java web apps can (and often do) go seriously wrong
(it talks a lot about efficient use of database backends, providing
relevance to PostgreSQL and this mailing list.)

richard
--
Richard Welty rwelty(at)averillpark(dot)net
Averill Park Networking 518-573-7592
Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robby Russell 2004-08-14 19:12:52 Re: Web application: Programming language/Framework
Previous Message Robert Paulsen 2004-08-14 18:22:24 Re: idle processes