| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Ants Aasma <ants(dot)aasma(at)eesti(dot)ee> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Checkpoint start logging is done inside critical section |
| Date: | 2018-10-18 04:51:39 |
| Message-ID: | CAA4eK1+T7mF=Dm2-NOJ_t3-=Aj26t9z3VSZouUy0Swqm_p3SAw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Oct 18, 2018 at 4:44 AM Ants Aasma <ants(dot)aasma(at)eesti(dot)ee> 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 inside LWLockAcquire as well which is
also called inside critical section in the nearby code, not sure if we
can do anything about it.
> It
> seems better to postpone the logging until after the critical section
> is done. It's only a few lwlock acquisitions away and shouldn't make
> any material difference. Patch to do so is attached.
>
+1. I think we should backpatch this as well. I can take it forward
unless people have objections to it.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2018-10-18 04:56:59 | Re: Checkpoint start logging is done inside critical section |
| Previous Message | Amit Kapila | 2018-10-18 04:00:11 | Re: DSM robustness failure (was Re: Peripatus/failures) |