pgsql: Use ereport(ERROR) instead of Assert() to emit syncrep_parser er

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use ereport(ERROR) instead of Assert() to emit syncrep_parser er
Date: 2016-04-11 06:53:28
Message-ID: E1apViy-00035s-MX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use ereport(ERROR) instead of Assert() to emit syncrep_parser error.

The existing code would either Assert or generate an invalid
SyncRepConfig variable, neither of which is desirable. A regular
error should be thrown instead.

This commit silences compiler warning in non assertion-enabled builds.

Per report from Jeff Janes.
Suggested fix by Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0038c1e2181b520a9307aae6587e110468072392

Modified Files
--------------
src/backend/replication/syncrep.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-04-11 11:09:18 Re: [COMMITTERS] pgsql: Move each SLRU's lwlocks to a separate tranche.
Previous Message Tom Lane 2016-04-11 04:28:52 pgsql: Fix poorly thought-through code from commit 5c3c3cd0a3046339.