pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c
Date: Sun, 15 Sep 2019 13:00:21 -0300
Message-ID: <20190915160021.GA24376@alvherre.pgsql> (raw)
In-Reply-To: <E1i8y0J-00076R-Jj@gemulon.postgresql.org>

On 2019-Sep-14, Noah Misch wrote:

> Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases.

I don't understand this.

    if (pg_atomic_fetch_add_u32(&var, INT_MAX) != INT_MAX)
        elog(ERROR, "pg_atomic_add_fetch_u32() #3 wrong");

    pg_atomic_fetch_add_u32(&var, 2);   /* wrap to 0 */

    if (pg_atomic_fetch_add_u32(&var, PG_INT16_MAX) != 0)
        elog(ERROR, "pg_atomic_fetch_add_u32() #3 wrong");

The existing one seems to be naming the wrong function in the error
message, and if you fix that then you have two "#3 wrong" cases.
Isn't this confusing?  Am I just too sensitive?  Is this pointless to
fix?

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





view thread (10+ messages)  latest in thread

Message-ID: <20190915160021.GA24376@alvherre.pgsql>
Permalink:  ../20190915160021.GA24376@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190915160021.GA24376@alvherre.pgsql

 · 

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-committers@postgresql.org
  Cc: alvherre@2ndquadrant.com, noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c
  In-Reply-To: <20190915160021.GA24376@alvherre.pgsql>

* 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