pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make pgbench's expression lexer reentrant.
3+ messages / 2 participants
[nested] [flat]

* pgsql: Make pgbench's expression lexer reentrant.
@ 2016-03-19 20:35 Tom Lane <tgl@sss.pgh.pa.us>
  2016-03-20 15:17 ` Re: pgsql: Make pgbench's expression lexer reentrant. Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2016-03-19 20:35 UTC (permalink / raw)
  To: pgsql-committers

Make pgbench's expression lexer reentrant.

This is a necessary preliminary step for making it play with psqlscan.l
given the way I set up the lexer input-buffer sharing mechanism in commit
0ea9efbe9ec1bf07.

I've not tried to make it *actually* reentrant; there's still some static
variables laying about.  But flex thinks it's reentrant, and that's what
counts.

In support of that, fix exprparse.y to pass through the yyscan_t from the
caller.  Also do some minor code beautification, like not casting away
const.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/429ee5a822db0e8faf669d77c810f1eeaaff1ab4

Modified Files
--------------
src/bin/pgbench/exprparse.y | 57 ++++++++++++++++++++-----------
src/bin/pgbench/exprscan.l  | 83 ++++++++++++++++++++++++++++-----------------
src/bin/pgbench/pgbench.c   | 15 +++++---
src/bin/pgbench/pgbench.h   | 26 +++++++++-----
4 files changed, 117 insertions(+), 64 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* Re: pgsql: Make pgbench's expression lexer reentrant.
  2016-03-19 20:35 pgsql: Make pgbench's expression lexer reentrant. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-03-20 15:17 ` Andres Freund <andres@anarazel.de>
  2016-03-20 17:12   ` Re: pgsql: Make pgbench's expression lexer reentrant. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Andres Freund @ 2016-03-20 15:17 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers

Hi Tom,

On 2016-03-19 20:35:48 +0000, Tom Lane wrote:
> Make pgbench's expression lexer reentrant.
> 
> This is a necessary preliminary step for making it play with psqlscan.l
> given the way I set up the lexer input-buffer sharing mechanism in commit
> 0ea9efbe9ec1bf07.
> 
> I've not tried to make it *actually* reentrant; there's still some static
> variables laying about.  But flex thinks it's reentrant, and that's what
> counts.
> 
> In support of that, fix exprparse.y to pass through the yyscan_t from the
> caller.  Also do some minor code beautification, like not casting away
> const.

This appears to have caused build failures on gaur, prairiedog, and
pademelon

http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=gaur&dt=2016-03-20%2005%3A53%3A21
http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=prairiedog&dt=2016-03-19%2023%3A21%3A23
http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=pademelon&dt=2016-03-20%2007%3A59%3A38

Not sure you saw those already.

- Andres


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



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

* Re: pgsql: Make pgbench's expression lexer reentrant.
  2016-03-19 20:35 pgsql: Make pgbench's expression lexer reentrant. Tom Lane <tgl@sss.pgh.pa.us>
  2016-03-20 15:17 ` Re: pgsql: Make pgbench's expression lexer reentrant. Andres Freund <andres@anarazel.de>
@ 2016-03-20 17:12   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2016-03-20 17:12 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers

Andres Freund <andres@anarazel.de> writes:
> On 2016-03-19 20:35:48 +0000, Tom Lane wrote:
>> Make pgbench's expression lexer reentrant.

> This appears to have caused build failures on gaur, prairiedog, and
> pademelon

Yeah, I know.  I have a plan for fixing it but wanted to get the
main pgbench parsing rewrite pushed first.

The problem seems to be that the ancient bison version these critters
are using has a bug for the combination of a reentrant lexer and a
non-reentrant parser.  Which it's not so surprising they'd not have
tested.  I think it won't be too painful to dodge this by making the
parser reentrant too (bison %pure-parser), and will look into that
this evening.

			regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



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


end of thread, other threads:[~2016-03-20 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-19 20:35 pgsql: Make pgbench's expression lexer reentrant. Tom Lane <tgl@sss.pgh.pa.us>
2016-03-20 15:17 ` Andres Freund <andres@anarazel.de>
2016-03-20 17:12   ` Tom Lane <tgl@sss.pgh.pa.us>

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