apache logs to pgsql

Поиск
Список
Период
Сортировка
От Marc Tardif
Тема apache logs to pgsql
Дата
Msg-id Pine.BSF.4.10.10001200124250.12998-100000@server.b0x.com
обсуждение исходный текст
Ответы Re: [GENERAL] apache logs to pgsql  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Список pgsql-general
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?

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.

Second, I have tried to see the alternative of writing an apache module
or, more sensibly, changing the current module responsible for logging.
After reading mod_log_config.c, I'm not really sure how I can integrate
libpq and avoid having to connect and disconnect repeatedly. If I can't
somehow sustain a connection, I imagine the module would be just as
efficient as using psql.

Lastly, I'm confused and overwhelmed by the size of the task at hand. I'd
appreciate any suggestions or recommendations or thoughts on whether
writing a module is even worthwhile at all.

Thanks,
Marc


В списке pgsql-general по дате отправления:

Предыдущее
От: Ed Loehr
Дата:
Сообщение: Re: [GENERAL] weird sum() results
Следующее
От: Eric van der Vlist
Дата:
Сообщение: Re: [GENERAL] apache logs to pgsql