Re: pgbench logging broken by time logic changes

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Gregory Smith <gregsmithpgsql(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, david(dot)christensen(at)crunchydata(dot)com
Subject: Re: pgbench logging broken by time logic changes
Date: 2021-06-24 06:46:03
Message-ID: alpine.DEB.2.22.394.2106240815480.1687456@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bonjour Michaël,

> Using grep() with "$re" results in all the fields matching. Using on
> the contrary "/$re/" in grep(), like list_files(), would only match
> the first one, which is correct.

Ok, good catch. Perl is kind of a strange language.

> With this issue fixed, I have bumped into what looks like a different
> bug in the tests. 001_pgbench_log_2 uses pgbench with 2 clients, but>
> expects only patterns in the logs where the first column value uses only
> 0. With two clients, those first values can be either 0 or 1 due to the
> client ID set.

Indeed. The tests passes because the number of expected lines is quite

> It seems to me that we had better fix this issue and back-patch where
> this has been introduced so as we have exact match checks with the log
> formarts, no? Please see the attached.

Ok, however the regex should be "^[01] ...".

Attached v11 with your fixes + the above regex fix.


Attachment Content-Type Size
pgbench-log-fix-11.patch text/x-diff 9.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-06-24 08:12:49 Re: wrong relkind error messages
Previous Message 2021-06-24 06:40:47 RE: Added schema level support for publication.