From: Thomas Carroll <tomfecarroll@yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Memory exhaustion due to temporary tables?
Date: Tue, 11 Dec 2018 00:01:10 +0000 (UTC)
Message-ID: <1761071676.2037719.1544486470070@mail.yahoo.com> (raw)
In-Reply-To: <7049.1544482214@sss.pgh.pa.us>
References: <2114009259.1866365.1544469996900.ref@mail.yahoo.com>
<2114009259.1866365.1544469996900@mail.yahoo.com>
<2584.1544474727@sss.pgh.pa.us>
<1497611735.1978595.1544479049695@mail.yahoo.com>
<7049.1544482214@sss.pgh.pa.us>
On Monday, December 10, 2018, 5:50:22 PM EST, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Is the error message spelling really exactly "Cannot allocate memory"?
Yes - but I think the message is forwarded from Linux. Here is an example:
2018-12-08 00:00:00.070 EST,,,32506,,5bc71a25.7efa,25643,,2018-10-17 07:16:53 EDT,,0,LOG,00000,"could not fork autovacuum worker process: Cannot allocate memory",,,,,,,,,""
Should have been more thoughtful in what I chose to mention. Here is one that may be more familiar, and directly related to the issue I am encountering:
2018-12-08 00:00:03.642 EST,"schema_name","db_name",24949,"10.12.113.56:50138",5bfed8cd.6175,17637,"SELECT",2018-11-28 13:05:01 EST,24/223502,0,ERROR,53200,"out of memory","Failed on request of size 24.",,,,"SQL statement ""CREATE TEMPORARY TABLE table_name ON COMMIT DROP AS
> Also, as mentioned upthread, it'd be interesting to see if there's
> a memory context dump showing up in your server log.
There are many memory context dumps, and they are long (well over 100 lines apiece). To me these are unfamiliar and hard to read, but I tried to pick one that referenced all the same tables used in the function. I put one such dump (188 lines) here:
tc.log
|
|
|
| | |
|
|
|
| |
tc.log
|
|
|
A hopefully-helpful short excerpt from the top:
TopMemoryContext: 174216 total in 7 blocks; 12520 free (27 chunks); 161696 used
pgstat TabStatusArray lookup hash table: 8192 total in 1 blocks; 632 free (0 chunks); 7560 used
TopTransactionContext: 24576 total in 2 blocks; 7288 free (3 chunks); 17288 used
Combo CIDs: 8192 total in 1 blocks; 1800 free (0 chunks); 6392 used
ExecutorState: 8192 total in 1 blocks; 7400 free (0 chunks); 792 used
ExprContext: 0 total in 0 blocks; 0 free (0 chunks); 0 used
SPI Exec: 2088960 total in 8 blocks; 865976 free (7 chunks); 1222984 used
ExecutorState: 262216 total in 6 blocks; 94344 free (11 chunks); 167872 used
HashTableContext: 8192 total in 1 blocks; 7584 free (0 chunks); 608 used
HashBatchContext: 197104 total in 6 blocks; 0 free (0 chunks); 197104 used
HashTableContext: 8192 total in 1 blocks; 7968 free (0 chunks); 224 used
HashBatchContext: 49240 total in 2 blocks; 8136 free (0 chunks); 41104 used
HashTableContext: 8192 total in 1 blocks; 7584 free (0 chunks); 608 used
HashBatchContext: 197104 total in 6 blocks; 0 free (0 chunks); 197104 used
Anything I can do to zero in on helpful information, I'm all ears.
Thanks so much!Tom
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: tomfecarroll@yahoo.com, tgl@sss.pgh.pa.us
Subject: Re: Memory exhaustion due to temporary tables?
In-Reply-To: <1761071676.2037719.1544486470070@mail.yahoo.com>
References: <2114009259.1866365.1544469996900.ref@mail.yahoo.com> <2114009259.1866365.1544469996900@mail.yahoo.com> <2584.1544474727@sss.pgh.pa.us> <1497611735.1978595.1544479049695@mail.yahoo.com> <7049.1544482214@sss.pgh.pa.us> <1761071676.2037719.1544486470070@mail.yahoo.com>
* 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