Re: [HACKERS] pg_shmem_allocations view

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] pg_shmem_allocations view
Date: 2019-12-18 15:59:10
Message-ID: 20191218155910.GA17674@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-12-18 15:59:20 Re: Windows port minor fixes
Previous Message Stephen Frost 2019-12-18 15:56:41 Re: Request to be allotted a project or a feature in pipeline