| From: | David Rowley <drowley(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Tidyup WARNING ereports in subscriptioncmds.c |
| Date: | 2025-11-06 20:50:20 |
| Message-ID: | E1vH6w0-005LTi-0Z@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Tidyup WARNING ereports in subscriptioncmds.c
A couple of ereports were making use of StringInfos as temporary storage
for the portions of the WARNING message. One was doing this to avoid
having 2 separate ereports. This was all fairly unnecessary and
resulted in more code rather than less code.
Refactor out the additional StringInfos and make
check_publications_origin_tables() use 2 ereports.
In passing, adjust pubnames to become a stack-allocated StringInfoData to
avoid having to palloc the temporary StringInfoData. This follows on
from the efforts made in 6d0eba662.
Author: Mats Kindahl <mats(dot)kindahl(at)gmail(dot)com>
Reviewed-by: David Rowley <dgrowleyml(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Discussion: https://postgr.es/m/0b381b02-cab9-41f9-a900-ad6c8d26c1fc%40gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/448b6a4173d007c75ba30fed666b60f0bd1afe8b
Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 59 +++++++++++++++------------------
1 file changed, 26 insertions(+), 33 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2025-11-06 21:43:49 | pgsql: bufmgr: Allow some buffer state modifications while holding head |
| Previous Message | Álvaro Herrera | 2025-11-06 19:35:28 | pgsql: Use XLogRecPtrIsValid() in various places |