Rainer, Thanks for this submission.
I have posted (for this problem) two patchs. The second one works also but without opening PGCon when the thread is created... ( You'll find it inline in this message ) I tought that it was the better appoach. but I let you decide.... If you prefer to keep your last submission , I'll test it for you as requested. Alain Le 10/02/14 16:38, Rainer Gerhards a écrit : > Unfortunately, I was too busy to merge before today. It's now merged into > the v7-stable branch. I would appreciate if you could check that it works > for you. Once this is OK, I think I can do a little tweak which may be > useful to prevent unnecessary startup work. > > Patch as integrated can be viewed here: > > https://github.com/rsyslog/rsyslog/commit/ff091b7ea963b63130cfb77af57f137e632bf765 > > Thanks again for the patch! > > > On Thu, Feb 6, 2014 at 11:47 AM, Rainer Gerhards > <[email protected]>wrote: > >> I am on my way to the Fedora Developer's Conference. I'll see that I >> review ASAP. >> >> Rainer >> >> >> On Thu, Feb 6, 2014 at 11:14 AM, ecze <[email protected]> wrote: >> >>> Ok, the patch works perfectly. >>> Is there anyone in charge to check, comment and commit it ? >>> I think this is quite critical because the *PGConn point to an invalid >>> address after the fork in the current versions ( 5/7/8 ) >>> >>> Alain >>> >>> >>> >>> >>> >>> ecze wrote >>>> Another patch ( not yet tested ) without useless PG connect.. >>>> >>> -------------------------------------patch---------------------------------- >>>> diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c >>>> index 11f346f..e236234 100644 >>>> --- a/plugins/ompgsql/ompgsql.c >>>> +++ b/plugins/ompgsql/ompgsql.c >>>> @@ -261,6 +261,8 @@ ENDtryResume >>>> >>>> >>>> BEGINbeginTransaction >>>> +if(pData->f_hpgsql == NULL) >>>> + initPgSQL(pData, 0); >>>> CODESTARTbeginTransaction >>>> dbgprintf("ompgsql: beginTransaction\n"); >>>> iRet = writePgSQL((uchar*) "begin", pData); /* TODO: make >>>> user-configurable */ >>>> @@ -346,8 +348,6 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) >>>> if (iPgSQLPropErr) { >>>> errmsg.LogError(0, RS_RET_INVALID_PARAMS, "Trouble with >>>> PgSQL connection properties. -PgSQL logging disabled"); >>>> ABORT_FINALIZE(RS_RET_INVALID_PARAMS); >>>> - } else { >>>> - CHKiRet(initPgSQL(pData, 0)); >>>> } >>>> >>>> CODE_STD_FINALIZERparseSelectorAct >>>> >>> -------------------------------------patch---------------------------------- >>>> >>>> Alain >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://rsyslog-users.1305293.n2.nabble.com/rsyslog-7-4-9-ompgsql-libpq-threads-problem-tp7584204p7584233.html >>> Sent from the rsyslog-users mailing list archive at Nabble.com. >>> _______________________________________________ >>> rsyslog mailing list >>> http://lists.adiscon.net/mailman/listinfo/rsyslog >>> http://www.rsyslog.com/professional-services/ >>> What's up with rsyslog? Follow https://twitter.com/rgerhards >>> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad >>> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you >>> DON'T LIKE THAT. >>> >> > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com/professional-services/ > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of > sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T > LIKE THAT. _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

