Re: Incorrect handling of OOM in WAL replay leading to data loss - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Incorrect handling of OOM in WAL replay leading to data loss
Date
Msg-id dba769593520d8e33d913db8b4a254c5e5608c11.camel@j-davis.com
Whole thread Raw
In response to Re: Incorrect handling of OOM in WAL replay leading to data loss  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Incorrect handling of OOM in WAL replay leading to data loss
List pgsql-hackers
On Tue, 2023-08-01 at 16:14 +0300, Aleksander Alekseev wrote:
> Probably I'm missing something, but if memory allocation is required
> during WAL replay and it fails, wouldn't it be a better solution to
> log the error and terminate the DBMS immediately?

We need to differentiate between:

1. No valid record exists and it must be the end of WAL; LOG and start
up.

2. A valid record exists and we are unable to process it (e.g. due to
OOM); PANIC.

Regards,
    Jeff Davis





pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Support to define custom wait events for extensions
Next
From: Jeff Davis
Date:
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.