pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remember to reset yy_start state when firing up repl_scanner.l.
Date: Mon, 24 Jan 2022 17:10:08 +0000
Message-ID: <E1nC2r2-0006uM-A2@gemulon.postgresql.org> (raw)

Remember to reset yy_start state when firing up repl_scanner.l.

Without this, we get odd behavior when the previous cycle of
lexing exited in a non-default exclusive state.  Every other
copy of this code is aware that it has to do BEGIN(INITIAL),
but repl_scanner.l did not get that memo.

The real-world impact of this is probably limited, since most
replication clients would abandon their connection after getting
a syntax error.  Still, it's a bug.

This mistake is old, so back-patch to all supported branches.

Discussion: https://postgr.es/m/1874781.1643035952@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/449a696236ff6d8a86b98ae6503aa51dc39a37b2

Modified Files
--------------
src/backend/replication/repl_scanner.l | 3 +++
1 file changed, 3 insertions(+)



view thread (6+ messages)  latest in thread

Message-ID: <E1nC2r2-0006uM-A2@gemulon.postgresql.org>
Permalink:  ../E1nC2r2-0006uM-A2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nC2r2-0006uM-A2@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Remember to reset yy_start state when firing up repl_scanner.l.
  In-Reply-To: <E1nC2r2-0006uM-A2@gemulon.postgresql.org>
  References: <E1nC2r2-0006uM-A2@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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