From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: OOM in spgist insert
Date: Thu, 13 May 2021 18:49:33 -0400
Message-ID: <20210513224933.GA20201@alvherre.pgsql> (raw)
In-Reply-To: <1724899.1620944427@sss.pgh.pa.us>
On 2021-May-13, Tom Lane wrote:
> What do people think about back-patching this? In existing branches,
> we've defined it to be an opclass bug if it fails to shorten the leaf
> datum enough. But not having any defenses against that seems like
> not a great idea. OTOH, the 10-cycles-to-show-progress rule could be
> argued to be an API break.
I think if the alternative is to throw an error, we can afford to retry
quite a few more times than 10 in order not have that called an API
break. Say, retry (MAXIMUM_ALIGNOF << 3) times or so (if you want to
parameterize on maxalign). It's not like this is going to be a
performance drag where not needed .. but I think leaving back-branches
unfixed is not great.
I did run Dilip's test case as well as your new regression test, and
both work as intended with your new code (and both OOM-crash the
original code).
--
Álvaro Herrera Valdivia, Chile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, pashkin.elfe@gmail.com, dilipbalaut@gmail.com
Subject: Re: OOM in spgist insert
In-Reply-To: <20210513224933.GA20201@alvherre.pgsql>
References: <1724899.1620944427@sss.pgh.pa.us> <20210513224933.GA20201@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox