Here's a proposal patch. Le ven. 11 déc. 2020 à 09:58, Benoit Lobréau <benoit.lobr...@gmail.com> a écrit :
> Would "NULL for anonymous allocations, since details related to them are > not known." be ok ? > > > Le ven. 11 déc. 2020 à 09:29, Kyotaro Horiguchi <horikyota....@gmail.com> > a écrit : > >> At Fri, 11 Dec 2020 14:42:45 +0900, Michael Paquier <mich...@paquier.xyz> >> wrote in >> > On Fri, Dec 11, 2020 at 11:00:58AM +0900, Kyotaro Horiguchi wrote: >> > > Although we could just rip some words off, I'd like to propose instead >> > > to add an explanation why it is not exposed for anonymous allocations, >> > > like the column allocated_size. >> > >> > Indeed, there is a hiccup between what the code does and what the docs >> > tell: the offset is not NULL for unused memory. >> > >> > > - The offset at which the allocation starts. NULL for anonymous >> > > - allocations and unused memory. >> > > + The offset at which the allocation starts. For anonymous >> allocations, >> > > + no information about individual allocations is available, so >> the column >> > > + will be NULL in that case. >> > >> > I'd say: let's be simple and just remove "and unused memory" because >> > anonymous allocations are... Anonymous so you cannot know details >> > related to them. That's something easy to reason about, and the docs >> > were written originally to remain simple. >> >> Hmm. I don't object to that. Howerver, isn't the description for >> allocated_size too verbose in that sense? >> >> regards. >> >> -- >> Kyotaro Horiguchi >> NTT Open Source Software Center >> >
From 711f6b60098e67c23a97458ce56893f0ac1afcb6 Mon Sep 17 00:00:00 2001 From: benoit <benoit.lobr...@dalibo.com> Date: Fri, 11 Dec 2020 09:44:51 +0100 Subject: [PATCH] Fix pg_shmem_allocation --- doc/src/sgml/catalogs.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 62711ee83f..89ca59b92b 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -12493,7 +12493,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </para> <para> The offset at which the allocation starts. NULL for anonymous - allocations and unused memory. + allocations, since details related to them are not known. </para></entry> </row> -- 2.25.4