pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Tomson <james@pushd.com>
Cc: pgsql-bugs@lists.postgresql.org, Eric Jensen <ej@pushd.com>
Subject: Re: invalid memory alloc request size from pg_stat_activity?
Date: Tue, 07 May 2019 10:59:30 -0400
Message-ID: <28356.1557241170@sss.pgh.pa.us> (raw)
In-Reply-To: <1CFDCCD6-B268-48D8-85C8-400D2790B2C3@pushd.com>
References: <1CFDCCD6-B268-48D8-85C8-400D2790B2C3@pushd.com>

James Tomson <james@pushd.com> writes:
> We're upgrading from postgresql 9.6 to 10.6 and everything is working fine, but any query against pg_stat_activity results in ERROR:  invalid memory alloc request size 1652113408

> e.g:

> ourdb=> SELECT pid, state, age(query_start, clock_timestamp()), usename, query FROM pg_stat_activity WHERE query != '<IDLE>' AND state != 'idle' ORDER BY age limit 100;
> ERROR:  invalid memory alloc request size 1652113408

That seems odd ...

> Maybe this has to do with us setting track_activity_query_size=102400?

It wouldn't surprise me if reading pg_stat_activity causes allocation of
track_activity_query_size * max_connections bytes, but unless you also
have max_connections set to some pretty insane value, that wouldn't
be enough to fit this observation.

Did you have these parameters set differently in 9.6?

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <28356.1557241170@sss.pgh.pa.us>
Permalink:  ../28356.1557241170@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28356.1557241170@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, james@pushd.com, ej@pushd.com
  Subject: Re: invalid memory alloc request size from pg_stat_activity?
  In-Reply-To: <28356.1557241170@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