[Pgpool-general] Modifying Log Output Pgpool-II

Rene rene at webdevelopment.com.gt
Thu Jul 31 15:32:38 UTC 2008


Hi everyone!

 

I'm new to pgpool-II, and I have configured 4 Pgpool-II instances in one
server, each one handle different nodes.

 

The distribution is like this:

 

Pgpool1               Node 1                 DB1, DB2

                                Node 2                 DB1, DB2

 

Pgpool2               Node 1                 DB3

 

Pgpool3               Node 3                 DB4, DB5

 

Pgpool4               Node 4                 DB6, DB7

 

I have modified the Pgpool-II scritp in /etc/init.d/pgpool2, And I have
created a copy for each one of the pools instances.

 

All the log info is written to syslog, I have changed the d_start()
procedure in each script to know wich Pgpool is getting connections.

 

d_start() {

        if is_running; then

                :

        else

                su -c "$DAEMON -n -f /etc/pgpool1.conf $OPTS 2>&1 </dev/null
| logger -t pgpool2-pool1 -p ${PGPOOL_SYSLOG_FACILITY:-local0}.info
>/dev/null 2>&1 &" - postgres

        fi

}

 

I'm logging connections, and I need to know If there is an way to add to
logger the name of the database where I'm connecting to.

 

if you notice, almost all the pool instances are handling two databases, and
I only know that there is a connection to the node, but I don't know wich of
the databases is handling the connection.

 

The purpose of this is to know how many connections per minute, hour, day is
handling  each pgpool to each database.

 

If you know a simple or better way to do this, I will appreciate hear about
it. Thanks you for your help.

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgpool-general/attachments/20080731/d5c09364/attachment.html 


More information about the Pgpool-general mailing list