Re: continuous data from stdin - Mailing list pgsql-general

From Steve Crawford
Subject Re: continuous data from stdin
Date
Msg-id 20030219163121.7AA59103BD@polaris.pinpointresearch.com
Whole thread Raw
In response to Re: continuous data from stdin  (Jeff Boes <jboes@nexcerpt.com>)
List pgsql-general
If you can route the stuff to syslog, consider the modular syslog daemon
(msyslogd). It has a Postgresql output module that puts the log data directly
into a database. I also have modified the module for one specific log stream
to parse out additional fields for entry into the database.

It has been quite robust (I have my syslog->postgres connection up for months
at a time and even then I'm only breaking the connection due to restarting
msyslogd after code tweaking).

Cheers,
Steve

On Tuesday 18 February 2003 10:34 am, Jeff Boes wrote:
> On Tue, 18 Feb 2003 13:09:45 -0500, ÷ÅÒÅÔÅÎÎÉËÏ× áÌÅËÓÅÊ wrote:
> > I think it's a common question, though I couldn't find any information
> > aboo= ut it so far. I've got a program that puts its logs into stdout.
> > What is th= e best solution to insert these logs into a table as they
> > occur?
>
> I think you're going to have to write a program (Perl using DBI would be
> my choice) to use this output as input, and do INSERT statements as each
> record is received.  (The COPY command in SQL won't do the trick, if
> that's what you're thinking of.)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.3.1 takes long time to vacuum table?
Next
From: Jonathan Bartlett
Date:
Subject: Re: Table Partitioning in Postgres: