Re: [GENERAL] apache logs to pgsql

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [GENERAL] apache logs to pgsql
Дата
Msg-id Pine.GSO.4.02A.10001201237010.15489-100000@Puma.DoCS.UU.SE
обсуждение исходный текст
Ответ на apache logs to pgsql  (Marc Tardif <admin@wtbwts.com>)
Список 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 по дате отправления:

Предыдущее
От: Andrzej Mazurkiewicz
Дата:
Сообщение: RE: [GENERAL] Grant problems
Следующее
От: Peter Haworth
Дата:
Сообщение: Creating simple type aliases