pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make invalid primary_slot_name follow standard GUC error reporti
7+ messages / 1 participants
[nested] [flat]

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:14 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:14 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f33e60a53a9ca89b5078df49416acae20affe1f5

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 13 +++++-
src/backend/replication/slot.c            | 78 ++++++++++++++++++++++---------
src/include/replication/slot.h            |  3 ++
3 files changed, 70 insertions(+), 24 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:15 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6ff7ba9fe525fd64cdafb242867d8d22486b88d9

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 13 ++++++-
src/backend/replication/slot.c            | 65 ++++++++++++++++++++++++-------
src/include/replication/slot.h            |  2 +
3 files changed, 64 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:15 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1db2870bb5abcfbd05e74195814706b737372472

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 13 ++++++-
src/backend/replication/slot.c            | 59 +++++++++++++++++++++++--------
src/include/replication/slot.h            |  2 ++
3 files changed, 58 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:15 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4fd916eab99c63410a084ab41dd5eb53328e45dc

Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 13 ++++++-
src/backend/replication/slot.c            | 59 +++++++++++++++++++++++--------
src/include/replication/slot.h            |  2 ++
3 files changed, 58 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:15 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/caf529aba22d5c9950239f56b6f3a2c3d1c09a6b

Modified Files
--------------
src/backend/replication/slot.c | 59 +++++++++++++++++++++++++++++++-----------
src/backend/utils/misc/guc.c   | 13 +++++++++-
src/include/replication/slot.h |  2 ++
3 files changed, 58 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:16 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f106f53df6f58cb3559b3e8b825a048f04863c52

Modified Files
--------------
src/backend/replication/slot.c | 59 +++++++++++++++++++++++++++++++-----------
src/backend/utils/misc/guc.c   | 13 +++++++++-
src/include/replication/slot.h |  2 ++
3 files changed, 58 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make invalid primary_slot_name follow standard GUC error reporti
@ 2025-10-22 11:16 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Fujii Masao @ 2025-10-22 11:16 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make invalid primary_slot_name follow standard GUC error reporting.

Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().

This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.

Backpatch to all supported versions.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b00a16baeb2ab8551ae752e86263e1c0bfc52d9c

Modified Files
--------------
src/backend/replication/slot.c | 59 +++++++++++++++++++++++++++++++-----------
src/backend/utils/misc/guc.c   | 13 +++++++++-
src/include/replication/slot.h |  2 ++
3 files changed, 58 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2025-10-22 11:16 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-22 11:14 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>
2025-10-22 11:15 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>
2025-10-22 11:15 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>
2025-10-22 11:15 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>
2025-10-22 11:15 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>
2025-10-22 11:16 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>
2025-10-22 11:16 pgsql: Make invalid primary_slot_name follow standard GUC error reporti Fujii Masao <fujii@postgresql.org>

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