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.

Reply via email to