Re: 001_password.pl fails with --without-readline
Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
From: Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
To: Soumya S Murali <soumyamurali.work@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2026-01-14T10:11:11Z
Lists: pgsql-hackers
Attachments
- v2-0002-030-pager-fix.patch (text/x-diff) patch v2-0002
The easiest way to fix 030_pager.pl is to just replace ' ' with '*' in regex. With readline, everything that we look for is placed on its own line so we don't break anything, but --without-readline produces the following output (with some hand-written debug info): IPC::Run 0000 [#2(438962)]: ** pumping IPC::Run 0000 [#2(438962)]: read( 11 ) = 4 chars '39 IPC::Run 0000 [#2(438962)]: ' stream:postgres=# \pset expanded SELECT generate_series(1,20) as g; Expanded display is on. postgres=# 39 So the output that is turned on with IPCRUNDEBUG=data shows us "we got only 4 chars, '39\n\0'!", but in reality we have more stuff in stream, so pump_until() function doesn't match with passed regex Patch is attached Regards, Oleg
Commits
-
Make psql/t/030_pager.pl more robust.
- 6918434a4acb 19 (unreleased) landed
-
Improve guards against false regex matches in BackgroundPsql.pm.
- fc84b3977e20 14.21 landed
- f356e2888cdb 17.8 landed
- bb6aedeca8d4 15.16 landed
- a1d7ae2b2e38 19 (unreleased) landed
- 92b3cc5a28f1 18.2 landed
- 6548e4a10d18 16.12 landed
-
Fix unsafe pushdown of quals referencing grouping Vars
- 34740b90bc12 19 (unreleased) cited
-
tests: BackgroundPsql: Fix potential for lost errors on windows
- 8b886a4e3488 18.0 cited