On Wed, 23 Mar 2022 14:26:54 -0400 Tom Lane <t...@sss.pgh.pa.us> wrote:
> Tatsuo Ishii <is...@sraoss.co.jp> writes: > > The patch Pushed. Thank you! > > My hoary animal prairiedog doesn't like this [1]: > > # Failed test 'concurrent update with retrying stderr /(?s-xim:client (0|1) > got an error in command 3 \\(SQL\\) of script 0; ERROR: could not serialize > access due to concurrent update\\b.*\\g1)/' > # at t/001_pgbench_with_server.pl line 1229. > # 'pgbench: pghost: /tmp/nhghgwAoki pgport: 58259 nclients: > 2 nxacts: 1 dbName: postgres > ... > # pgbench: client 0 got an error in command 3 (SQL) of script 0; ERROR: > could not serialize access due to concurrent update > ... > # ' > # doesn't match '(?s-xim:client (0|1) got an error in command 3 \\(SQL\\) > of script 0; ERROR: could not serialize access due to concurrent > update\\b.*\\g1)' > # Looks like you failed 1 test of 425. > > I'm not sure what the "\\b.*\\g1" part of this regex is meant to > accomplish, but it seems to be assuming more than it should > about the output format of TAP messages. I have edited the test code from the original patch by mistake, but I could not realize because the test works in my machine without any errors somehow. I attached a patch to fix the test as was in the original patch, where backreferences are used to check retry of the same query. Regards, Yugo Nagata -- Yugo NAGATA <nag...@sraoss.co.jp>
diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index d173ceae7a..3eb5905e5a 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -1222,7 +1222,8 @@ local $ENV{PGOPTIONS} = "-c default_transaction_isolation=repeatable\\ read"; # Check that we have a serialization error and the same random value of the # delta variable in the next try my $err_pattern = - "client (0|1) got an error in command 3 \\(SQL\\) of script 0; " + "(client (0|1) sending UPDATE xy SET y = y \\+ -?\\d+\\b).*" + . "client \\g2 got an error in command 3 \\(SQL\\) of script 0; " . "ERROR: could not serialize access due to concurrent update\\b.*" . "\\g1";