Re: [bug fix] Cascaded standby cannot start after a clean shutdown - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [bug fix] Cascaded standby cannot start after a clean shutdown
Date
Msg-id 20180316054747.GJ2666@paquier.xyz
Whole thread Raw
In response to RE: [bug fix] Cascaded standby cannot start after a clean shutdown  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Responses RE: [bug fix] Cascaded standby cannot start after a clean shutdown  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
On Fri, Mar 16, 2018 at 05:27:58AM +0000, Tsunakawa, Takayuki wrote:
> Honestly, I'm fine with either patch.  I like your simpler and cleaner
> one that has no performance impact.  But please note that the
> allocation attempt could amount to nearly 1 GB.  That can fail due to
> memory shortage, which leads to FATAL error (ereport(ERROR) results in
> FATAL in startup process), and cause standby to shut down.

We use palloc_extended with MCXT_ALLOC_NO_OOM in 9.5~, and malloc()
further down, so once you remove the FATAL error caused by a record
whose length is higher than 1GB, you discard all the hard failures, no?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: [bug fix] Cascaded standby cannot start after a clean shutdown