pgLOGd 2.3 review

by on

pgLOGd is a project for logging Apache access log entries to a PostgreSQL database. Here are some key features of "pgLOGd": · Dat

License: GPL (GNU General Public License)
File size: 22K
Developer: Digital Stratum, Inc.
0 stars award from

pgLOGd is a project for logging Apache access log entries to a PostgreSQL database.

Here are some key features of "pgLOGd":
Database logging. The primary feature that gave pgLOGd its name. Instead of writing log entries to a file, pgLOGd writes them to a database. The advantages of this method over logging to a file are explained in the README.
Fast. pgLOGd was designed to be as fast as possible, just as if the web server was logging to a file.
Robust. pgLOGd is smart and will attempt to recover from errors, network failures, and database problems when possible.
Fall-Back-Logging. This is part of the robustness of pgLOGd. If the connection to the database fails for any reason, pgLOGd will begin to write the log entries to a temporary overflow file. pgLOGd will then attempt to re-establish the database connection every 30 seconds (configurable) until it restores the database connection. At this time pgLOGd will begin processing the overflow file entries to the database during idle moments. The overflow file will also be used when entries are coming in from the web server faster than they can be set to the database, which is how pgLOGd achieves its "as fast as writing to a file" speed. Then during slow periods the entries will be processed from the overflow file and sent to the database.
Non-blocking. This is also what allows pgLOGd to be extremely responsive and fast, it never waits for anything to finish. Simply put, pgLOGd will ask the database to store an entry, then come back later to see if it was successful, instead of waiting around for the database to finish. This allows pgLOGd to continue processing entries from the web server while previous entries are being written to the database. The non-blocking functionality of pgLOGd is also one of the reasons why PostgreSQL was chosen, because of its excellent asynchronous connection and query processing provided by its C interface.
Small system overhead and resource usage. pgLOGd runs as a single daemon process and typically uses less that 128K of memory.
Flexible. pgLOGd was designed to be configurable and as system and web server independent as possible.

A PostgreSQL database installation.
A Web Server capable of writing its log entries to a file and which has a customizable log entry format. pgLOGd was developed with Apache in mind and that is the recommend web server.
A C compiler. After all, you get the source! The GNU gcc compiler is recommended (comes standard with most U*IX OSes.)
A multi-tasking OS, FreeBSD is my preference and the development platform.

What's New in This Release:
This is the release of the 2.2-beta, which has been stable for over a year. There is one new utility (pglogctl) included. I have received a lot of great feedback on the project, thank you all! I am planning a new version (3.0) and a rewrite of this site, but of course real jobs, life, new babies, etc. seem to devour time at an exponential rate.

pgLOGd 2.3 search tags