pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anton A. Melnikov <a.melnikov@postgrespro.ru>
To: Drouvot, Bertrand <bdrouvot@amazon.com>
To: Andres Freund <andres@anarazel.de>
To: Greg Stark <stark@mit.edu>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: shared-memory based stats collector - v70
Date: Tue, 3 Dec 2024 13:37:48 +0300
Message-ID: <a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru> (raw)
In-Reply-To: <5bfcf1a5-4224-9324-594b-725e704c95b1@amazon.com>
References: <caa515eb-e9e7-9fe7-ceb1-a96b6f3787ce@amazon.com>
	<CAM-w4HNqCR7X9q5_wbJi4wLfTT1gLvy5VRS+ZGo6z8-DbXkHpw@mail.gmail.com>
	<5db2b670-f3df-57ea-bdc6-962a582ff2e4@amazon.com>
	<CAM-w4HP_YL8uPrNiv2DPKmq1KD3QLEX7CBLc5DCJ9j7mf7eerw@mail.gmail.com>
	<0befffb3-8323-f2cd-915f-0ab64396f500@amazon.com>
	<CAM-w4HPGq_rpZAW4p71+d90oykyi9y7PgiQ1c9_ROs+WROCjuQ@mail.gmail.com>
	<1c56f4c6-61ce-d131-553c-297326e20bf1@amazon.com>
	<CAM-w4HNLtcKxrG0WepCKjt5tizbvZRcrqABX=jNNZoi_18E5rw@mail.gmail.com>
	<7f622949-2d78-c030-e7e0-cdee5f6cf79b@amazon.com>
	<CAM-w4HNm06PcCM40-kY+jLgD_Tqjr3ymBy8qErfOvWqQyJE+6Q@mail.gmail.com>
	<20220818195124.c7ipzf6c5v7vxymc@awork3.anarazel.de>
	<5bfcf1a5-4224-9324-594b-725e704c95b1@amazon.com>

Hi!

Found a place in the code of this patch that is unclear to me:
https://github.com/postgres/postgres/blob/1acf10549e64c6a52ced570d712fcba1a2f5d1ec/src/backend/utils...

Owing assert() the next if() should never be performed, but the comment above says the opposite.
Is this assert really needed here? And if so, for what?

Would be glad for clarification.


With the best regards,

-- 
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





view thread (93+ messages)  latest in thread

Message-ID: <a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru>
Permalink:  ../a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru/
Also on:    postgresql.org/message-id/a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.melnikov@postgrespro.ru, bdrouvot@amazon.com, andres@anarazel.de, stark@mit.edu, tgl@sss.pgh.pa.us, melanieplageman@gmail.com, horikyota.ntt@gmail.com, pryzby@telsasoft.com, thomas.munro@gmail.com, david.g.johnston@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: shared-memory based stats collector - v70
  In-Reply-To: <a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox