pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Euler Taveira <euler@timbira.com.br>
Cc: 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 11:14:27 -0400
Message-ID: <28926.1557242067@sss.pgh.pa.us> (raw)
In-Reply-To: <20190507145513.GA7111@alvherre.pgsql>
References: <20190507145513.GA7111@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Hmm, but 102400 is only 100kB, nowhere near the 1GB-1 limit, so there's
> something odd going on there.

I can reproduce the described behavior by also setting max_connections
to something around 16K.

Now, it seems pretty silly to me to be burning in excess of 1GB of shmem
just for the current-query strings, and then that much again in every
backend that reads pg_stat_activity.  But should we be telling people they
can't do it?  I'm working on a patch to use MemoryContextAllocHuge for
the "localactivity" buffer in pgstat_read_current_status.  It might seem
dumb now, but perhaps in ten years it'll be common.

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <28926.1557242067@sss.pgh.pa.us>
Permalink:  ../28926.1557242067@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28926.1557242067@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, alvherre@2ndquadrant.com, euler@timbira.com.br, james@pushd.com, ej@pushd.com
  Subject: Re: invalid memory alloc request size from pg_stat_activity?
  In-Reply-To: <28926.1557242067@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