Re: invalid memory alloc request size from pg_stat_activity?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Tomson <james(at)pushd(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Eric Jensen <ej(at)pushd(dot)com>
Subject: Re: invalid memory alloc request size from pg_stat_activity?
Date: 2019-05-07 14:59:30
Message-ID: 28356.1557241170@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

James Tomson <james(at)pushd(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-05-07 15:14:27 Re: invalid memory alloc request size from pg_stat_activity?
Previous Message Alvaro Herrera 2019-05-07 14:55:13 Re: invalid memory alloc request size from pg_stat_activity?