Re: pgbench logging broken by time logic changes
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Andrew Dunstan <andrew@dunslane.net>,
Thomas Munro <thomas.munro@gmail.com>,
Gregory Smith <gregsmithpgsql@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>,
david.christensen@crunchydata.com
Date: 2021-06-24T06:46:03Z
Lists: pgsql-hackers
Attachments
- pgbench-log-fix-11.patch (text/x-diff) patch
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. -- Fabien.
Commits
-
Fix pgbench timestamp bugs.
- 5614a0f78eaa 14.0 landed
- 0e39a608ed55 15.0 landed
-
Fix pattern matching logic for logs in TAP tests of pgbench
- 0efd2a1a66dd 11.13 landed
- 79ff96aa9d9a 12.8 landed
- 7a9eaf111ac0 13.4 landed
- c13585fe9e55 14.0 landed
-
pgbench: Improve time logic.
- 547f04e7348b 14.0 cited
-
pgbench: Synchronize client threads.
- aeb57af8e640 14.0 cited
-
pgbench: refactor handling of stats tracking
- b60376649600 9.6.0 cited