On Tue, May 6, 2014 at 2:34 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Andres Freund <and...@2ndquadrant.com> writes: >> Attached are two patches: >> a) Patch addin a 'name' parameter to dsm_create(). I think we should >> apply this to 9.4. >> b) pg_dynamic_shmem_allocations and pg_static_shmem_allocations >> views. The previous version didn't include dsm support and didn't >> take the required lock. > >> I am not so sure whether b) should be applied together with a) in 9.4, >> but I'd be happy enough to add docs if people agree with the naming. > > FWIW, I vote for fixing (a) now but holding (b) for 9.5.
I guess I'll vote for applying both. I don't see a lot of risk, and I think doing one with out the other is somewhat pointless. Regarding patch 0002, I don't think we're using the term "static shmem" anywhere else, so I vote for dropping the word static, so that we have pg_get_shmem_allocations() and pg_get_dynamic_shmem_allocations(). Also, I think using the "allocated" column is pretty weird. There are always exactly two entries with allocated = false, one of which is for actual free memory and the other of which is for memory that actually IS allocated but without using ShmemIndex (maybe the latter was supposed to have allocated = true but still key = null?). I guess I'd vote for ditching the allocated column completely and outputting the memory allocated without ShmemIndex using some fixed tag (like "ShmemIndex" or "Bootstrap" or "Overhead" or something). -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers