Checkpoint start logging is done inside critical section

From: Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Checkpoint start logging is done inside critical section
Date: 2018-10-17 23:14:00
Message-ID: CA+CSw_v5_gGVQgS2i1rg_hGwiCeGYyomB8u8VoXSY=T4+4DybQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 few lwlock acquisitions away and shouldn't make
any material difference. Patch to do so is attached.

Regards,
Ants Aasma

Attachment Content-Type Size
log-checkpoint-after-critical-section.patch text/x-patch 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2018-10-18 00:06:47 RE: Implementation of Flashback Query
Previous Message Larry Rosenman 2018-10-17 23:09:28 Re: DSM robustness failure (was Re: Peripatus/failures)