Re: [HACKERS] error handling in logging hooks

2012-08-12 Thread Peter Eisentraut
On Sat, 2012-08-11 at 14:05 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > What is the intended way to handle errors in the new logging hook? > > I'm not sure there is anything very useful you can do to "handle" them, > if by "handle" you mean "report somewhere". Yes, they ought to be wri

Re: [HACKERS] error handling in logging hooks

2012-08-11 Thread Peter Eisentraut
On Sat, 2012-08-11 at 14:05 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > What is the intended way to handle errors in the new logging hook? > > I'm not sure there is anything very useful you can do to "handle" them, > if by "handle" you mean "report somewhere". Yes, they ought to be wri

Re: [HACKERS] error handling in logging hooks

2012-08-11 Thread Tom Lane
Peter Eisentraut writes: > What is the intended way to handle errors in the new logging hook? I'm not sure there is anything very useful you can do to "handle" them, if by "handle" you mean "report somewhere". >From the point of view of elog.c, anything that might go wrong inside a logging hook

[HACKERS] error handling in logging hooks

2012-08-10 Thread Peter Eisentraut
What is the intended way to handle errors in the new logging hook? For example, errors in establishing a connection to wherever a hook wants to send things. The reference implementation pg_logforward just uses fprintf(stderr) to communicate its own errors, which doesn't seem ideal. Calling elog(