Hello,

I'm trying to add audit capability to Postgresql server. When the Postgresql server starts up, the server will start audit functions as a new subprocess thus the server will have 5 subprocesses instead of 4. I want to store logs in a database within the same Postgresql server [from audit subprocess, this means connection functions are part of the audit process].

Problem is that when I tried to connect to server [using libpq interface] I've always get this message:
"canceling authentication due to timeout",
but if I ran the same code as a new process [not a subprocess for Postgresql server] there will be no problem!

Now, my question is : How can I connect to server from one its subprocesses, is it even possible?

Thanks

Search Discussions

  • Tom Lane at Aug 14, 2011 at 5:02 pm

    Amir Abdollahi writes:
    I'm trying to add audit capability to Postgresql server. When the
    Postgresql server starts up, the server will start audit functions as
    a new subprocess thus the server will have 5 subprocesses instead of 4.
    That doesn't sound like it's going to lead to a very well-performing
    design, but I digress.
    Problem is that when I tried to connect to server [using libpq interface] I've always get this message:
    "canceling authentication due to timeout",
    If you added any locking into the authentication transaction, maybe you
    are getting bit by the same bug I just fixed:
    http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=592b615d71caac8a3504276a805a6fd024c40041

    regards, tom lane

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedAug 14, '11 at 8:27a
activeAug 14, '11 at 5:02p
posts2
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Tom Lane: 1 post Amir Abdollahi: 1 post

People

Translate

site design / logo © 2021 Grokbase