v1-0001-WAIT-FOR-Remove-redundant-pg_unreachable-after-el.patch
application/octet-stream
Filename: v1-0001-WAIT-FOR-Remove-redundant-pg_unreachable-after-el.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v1-0001
Subject: WAIT FOR: Remove redundant pg_unreachable() after elog(ERROR)
| File | + | − |
|---|---|---|
| src/backend/commands/wait.c | 0 | 3 |
From b7e3036d1872b96303f7defdad2f6f9332e89f8e Mon Sep 17 00:00:00 2001 From: alterego655 <824662526@qq.com> Date: Tue, 20 Jan 2026 08:40:24 +0800 Subject: [PATCH v1] WAIT FOR: Remove redundant pg_unreachable() after elog(ERROR) elog(ERROR) never returns, so the following pg_unreachable() calls are unnecessary. This pattern is useful for non-void functions, but these cases are in a void function. --- src/backend/commands/wait.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/backend/commands/wait.c b/src/backend/commands/wait.c index 54f2df2425f..212a0407871 100644 --- a/src/backend/commands/wait.c +++ b/src/backend/commands/wait.c @@ -236,7 +236,6 @@ ExecWaitStmt(ParseState *pstate, WaitStmt *stmt, DestReceiver *dest) default: elog(ERROR, "unexpected wait LSN type %d", lsnType); - pg_unreachable(); } } else @@ -281,7 +280,6 @@ ExecWaitStmt(ParseState *pstate, WaitStmt *stmt, DestReceiver *dest) default: elog(ERROR, "unexpected wait LSN type %d", lsnType); - pg_unreachable(); } } else @@ -311,7 +309,6 @@ ExecWaitStmt(ParseState *pstate, WaitStmt *stmt, DestReceiver *dest) default: elog(ERROR, "unexpected wait LSN type %d", lsnType); - pg_unreachable(); } } } -- 2.51.0