Re: [GENERAL] apache logs to pgsql - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: [GENERAL] apache logs to pgsql
Date
Msg-id Pine.GSO.4.02A.10001201237010.15489-100000@Puma.DoCS.UU.SE
Whole thread Raw
In response to apache logs to pgsql  (Marc Tardif <admin@wtbwts.com>)
List pgsql-general
On Thu, 20 Jan 2000, Marc Tardif wrote:

> In the contrib directory, there is an example on how to redirect apache
> logs to a postgresql database. It says to create a table and change two
> lines in the apache configuration file to use psql for copying the
> logs to the database.
>
> My question is: using an sql db is mostly compelling for very active
> sites but, if this is the case, is it sensible to use psql?

That's definitely overkill and possibly too slow on busy sites. What you
might want to do is write a "psql light" that simply takes strings on the
standard input and sends them to the backend. You'd still have to link
that against libpq but you might find it to be more efficient.

> First, I find that using the psql command could have too much overhead.
> Seeing the executable is 46696 bytes and dynamically linked, I'm not
> really sure what is the strain on the system for bringing up psql.

Not to mention the fact that every time you start it up psql does a whole
bunch of initializing, and every line of input you pass it is first parsed
before deciding what to do with it.


--
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-general by date:

Previous
From: Andrzej Mazurkiewicz
Date:
Subject: RE: [GENERAL] Grant problems
Next
From: Peter Haworth
Date:
Subject: Creating simple type aliases