From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stefan Blanke <stefan.blanke@framestore.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Jan Wieck <jan@wi3ck.info>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: ERROR: invalid memory alloc request size 1073741824
Date: Wed, 11 Mar 2020 11:37:59 -0400
Message-ID: <6704.1583941079@sss.pgh.pa.us> (raw)
In-Reply-To: <a3254338-a942-21a3-6393-9cc2a71f9810@framestore.com>
References: <733ecd96-48ed-8d49-15e1-413eb535c4c6@framestore.com>
<CAGBW59dUpbSvVHueoYYR3zk04gWPAuutSuLS-bAGPyMbG9Ow0g@mail.gmail.com>
<28d517a9-bf36-1a79-c2e7-6356dcd31064@2ndquadrant.com>
<ab3b5179-e840-4205-1841-6315c9f62583@framestore.com>
<CAGBW59dKrpjPLkEMu_bfyJuF=DM7+d8v+M8YDMkaUEhmu3pMeQ@mail.gmail.com>
<9b1b1008-45fd-8c1a-c45b-6b5be9b24e53@2ndquadrant.com>
<a3254338-a942-21a3-6393-9cc2a71f9810@framestore.com>
Stefan Blanke <stefan.blanke@framestore.com> writes:
> We've upgraded to PostgreSQL 11.5 (postgresql.org rhel 6 rpm) and I have
> had another occurrence of this invalid alloc of 1GB. Apologies for never
> providing a query plan when discussing this two years ago; we decided to
> move to a newer PostgreSQL to see if the issue went away but took a
> while to complete the move.
> The invalid alloc still only occurs occasionally every few months on a
> query that we run every minute; so unfortunately we still don't have a
> contained reproducible test case.
Given the lack of stats, I wonder whether the issue could be related
to the plan sometimes being horribly bad, eg due to the temp table
being much larger than expected. (A possible mechanism would be
hash table bloat, perhaps, but that's getting way ahead of the
evidence.)
Could you adjust your process to log the actual temp table size
each time, ie "select count(*) from temp_table" in between the
two steps, and then note whether the failures are correlated
with unusual temp table sizes?
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, stefan.blanke@framestore.com, tomas.vondra@2ndquadrant.com, jan@wi3ck.info
Subject: Re: ERROR: invalid memory alloc request size 1073741824
In-Reply-To: <6704.1583941079@sss.pgh.pa.us>
References: <733ecd96-48ed-8d49-15e1-413eb535c4c6@framestore.com> <CAGBW59dUpbSvVHueoYYR3zk04gWPAuutSuLS-bAGPyMbG9Ow0g@mail.gmail.com> <28d517a9-bf36-1a79-c2e7-6356dcd31064@2ndquadrant.com> <ab3b5179-e840-4205-1841-6315c9f62583@framestore.com> <CAGBW59dKrpjPLkEMu_bfyJuF=DM7+d8v+M8YDMkaUEhmu3pMeQ@mail.gmail.com> <9b1b1008-45fd-8c1a-c45b-6b5be9b24e53@2ndquadrant.com> <a3254338-a942-21a3-6393-9cc2a71f9810@framestore.com> <6704.1583941079@sss.pgh.pa.us>
* 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