Re: Checkpoint start logging is done inside critical section

2018-10-18 Thread Ants Aasma
On Thu, Oct 18, 2018 at 9:02 AM Amit Kapila wrote: > > On Thu, Oct 18, 2018 at 10:27 AM Andres Freund wrote: > > (that's why we mark the ctx as being ok with that). > > > > Yeah, as the palloc for log message would be called in an ErrorContext > where it is safe to do the allocation, so ideally

Re: Checkpoint start logging is done inside critical section

2018-10-18 Thread Amit Kapila
On Thu, Oct 18, 2018 at 10:27 AM Andres Freund wrote: > > Hi, > > On 2018-10-18 10:21:39 +0530, Amit Kapila wrote: > > On Thu, Oct 18, 2018 at 4:44 AM Ants Aasma wrote: > > > > > > The LogCheckpointStart() call inside CreateCheckPoint() is done while > > > inside a critical section. The elog

Re: Checkpoint start logging is done inside critical section

2018-10-17 Thread Andres Freund
Hi, On 2018-10-18 10:21:39 +0530, Amit Kapila wrote: > On Thu, Oct 18, 2018 at 4:44 AM Ants Aasma wrote: > > > > The LogCheckpointStart() call inside CreateCheckPoint() is done while > > inside a critical section. The elog call could trigger errors due to > > memory allocations or from a logging

Re: Checkpoint start logging is done inside critical section

2018-10-17 Thread Amit Kapila
On Thu, Oct 18, 2018 at 4:44 AM Ants Aasma wrote: > > The LogCheckpointStart() call inside CreateCheckPoint() is done while > inside a critical section. The elog call could trigger errors due to > memory allocations or from a logging hook, resulting in a panic. > Yeah, but we use logging hook

Checkpoint start logging is done inside critical section

2018-10-17 Thread Ants Aasma
The LogCheckpointStart() call inside CreateCheckPoint() is done while inside a critical section. The elog call could trigger errors due to memory allocations or from a logging hook, resulting in a panic. It seems better to postpone the logging until after the critical section is done. It's only a