Re: [HACKERS] pg_shmem_allocations view - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] pg_shmem_allocations view
Date
Msg-id 20191218155910.GA17674@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] pg_shmem_allocations view  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] pg_shmem_allocations view  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2019-Dec-18, Robert Haas wrote:

> - code: Declare values/nulls arrays only once at function scope
> instead of 3x, and tighten up code, per Andres and self-review.

Really small nit: I'd rather have the "nulls" assignment in all cases
even when the previous value is still valid.  This tight coding seems
weirdly asymmetrical.

Can we please stop splitting this error message in two?

+                errmsg("materialize mode required, but it is not " \
+                       "allowed in this context")));

(What's with the newline escape there anyway?)


Shmem structs are cacheline-aligned; the padding space is not AFAICS
considered in ShmemIndexEnt->size.  The reported size would be
under-reported (or reported as "anonymous"?)  I think we should include
the alignment padding, for clarity.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Request to be allotted a project or a feature in pipeline
Next
From: Stephen Frost
Date:
Subject: Re: Windows port minor fixes