pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove redundant pg_unreachable() after elog(ERROR) from ExecWai
Date: Tue, 20 Jan 2026 14:10:34 +0000
Message-ID: <E1viCRG-001cP7-0X@gemulon.postgresql.org> (raw)

Remove redundant pg_unreachable() after elog(ERROR) from ExecWaitStmt()

elog(ERROR) never returns.  Compilers don't always understand this.  So,
sometimes, we have to append pg_unreachable() to keep the compiler quiet
about returning from a non-void function without a value.  But
pg_unreachable() is redundant for ExecWaitStmt(), which is void.

Reported-by: Peter Eisentraut <peter@eisentraut.org>
Author: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/8d72a2b3-7423-4a15-a981-e130bf60b1a6%40eisentraut.org
Discussion: https://postgr.es/m/CABPTF7UcuVD0L-X%3DjZFfeygjPaZWWkVRwtWOaJw2tcXbEN2xsA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/30776ca46865f9e04ff6eb5cfdd64eb8bf5c4ff1

Modified Files
--------------
src/backend/commands/wait.c | 3 ---
1 file changed, 3 deletions(-)



Message-ID: <E1viCRG-001cP7-0X@gemulon.postgresql.org>
Permalink:  ../E1viCRG-001cP7-0X@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1viCRG-001cP7-0X@gemulon.postgresql.org

 · 

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: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove redundant pg_unreachable() after elog(ERROR) from ExecWai
  In-Reply-To: <E1viCRG-001cP7-0X@gemulon.postgresql.org>

* 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