Re: pg_shmem_allocations view

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: pg_shmem_allocations view
Date: 2014-05-04 11:50:56
Message-ID: 20140504115056.GN12715@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2014-05-04 13:44:17 +0200, Andres Freund wrote:
> postgres=# SELECT * FROM pg_shmem_allocations ORDER BY size DESC;
> key | off | size | allocated
> -------------------------------------+-------------+-------------+-----------
> Buffer Blocks | 286242528 | 17179869184 | t
> Buffer Descriptors | 152024800 | 134217728 | t
> ...
> OldSerXidControlData | 17584357344 | 16 | t
> (44 rows)

Thinking about this, I think it was a mistake to not add a 'name' field
to dynamic shared memory's dsm_control_item. Right now it's very hard to
figure out which extension allocated a dsm segment. Imo we should change
that before 9.4 is out. I am not suggesting to use it to identify
segments, but just as an identifier, passed in into dsm_create().

Imo there should be a corresponding pg_dynshmem_allocations to
pg_shmem_allocations.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-05-04 12:02:09 Re: pg_shmem_allocations view
Previous Message Andres Freund 2014-05-04 11:44:17 pg_shmem_allocations view