Avoid throwing away the error message in syncrep_yyerror.

Robert Haas <rhaas@postgresql.org>

Commit: 44e135ad57b242a89266b0aebaaf523a01a3484c
Author: Robert Haas <rhaas@postgresql.org>
Date: 2025-07-28T14:57:10Z
Releases: 18.0
Avoid throwing away the error message in syncrep_yyerror.

Commit 473a575e05979b4dbb28b3f2544f4ec8f184ce65 purported to make this
function stash the error message in *syncrep_parse_result_p, but
it didn't actually.

As a result, an attempt to set synchronous_standby_names to any value
that does not parse resulted in a generic "parser failed." message
rather than anything more specific. This fixes that.

Discussion: http://postgr.es/m/CA+TgmoYF9wPNZ-Q_EMfib_espgHycY-eX__6Tzo2GpYpVXqCdQ@mail.gmail.com
Backpatch-through: 18

Files

PathChange+/−
src/backend/replication/syncrep_scanner.l modified +5 −6

Discussion