Thread

Commits

  1. Don't use pgbench -j in tests

  1. Failure with pgbench and --disable-thread-safety in ~v16

    Michael Paquier <michael@paquier.xyz> — 2023-12-04T07:59:48Z

    Hi all,
    (Alvaro in CC.)
    
    While running some tests for 8984480b545d, I have noticed that the TAP
    tests of pgbench fail when ~16 is compiled with
    --disable-thread-safety:
    [16:51:10.467](0.004s) not ok 227 - working \startpipeline with serializable status (got 1 vs expected 0)
    [16:51:10.467](0.000s) 
    [16:51:10.467](0.000s) #   Failed test 'working \startpipeline with serializable status (got 1 vs expected 0)'
    #   at t/001_pgbench_with_server.pl line 845.
    [16:51:10.467](0.000s) not ok 228 - working \startpipeline with serializable stdout /(?^:type: .*/001_pgbench_pipeline_serializable)/
    [16:51:10.467](0.000s) 
    [16:51:10.467](0.000s) #   Failed test 'working \startpipeline with serializable stdout /(?^:type: .*/001_pgbench_pipeline_serializable)/'
    #   at t/001_pgbench_with_server.pl line 845.
    [16:51:10.467](0.000s) #                   ''
    #     doesn't match '(?^:type: .*/001_pgbench_pipeline_serializable)'
    [16:51:10.467](0.000s) not ok 229 - working \startpipeline with serializable stdout /(?^:actually processed: (\d+)/\1)/
    [16:51:10.467](0.000s) 
    [16:51:10.467](0.000s) #   Failed test 'working \startpipeline with serializable stdout /(?^:actually processed: (\d+)/\1)/'
    #   at t/001_pgbench_with_server.pl line 845.
    [16:51:10.467](0.000s) #                   ''
    #     doesn't match '(?^:actually processed: (\d+)/\1)'
    
    This ./configure switch has been removed in 17~, and, while I've not
    analyzed the problem in details, I am wondering if this points to an
    actual bug with \startpipeline in all branches.
    
    Thanks,
    --
    Michael
    
  2. Re: Failure with pgbench and --disable-thread-safety in ~v16

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-12-04T11:09:32Z

    On 2023-Dec-04, Michael Paquier wrote:
    
    > While running some tests for 8984480b545d, I have noticed that the TAP
    > tests of pgbench fail when ~16 is compiled with
    > --disable-thread-safety:
    > [16:51:10.467](0.004s) not ok 227 - working \startpipeline with serializable status (got 1 vs expected 0)
    > [16:51:10.467](0.000s) 
    > [16:51:10.467](0.000s) #   Failed test 'working \startpipeline with serializable status (got 1 vs expected 0)'
    > #   at t/001_pgbench_with_server.pl line 845.
    > [16:51:10.467](0.000s) not ok 228 - working \startpipeline with serializable stdout /(?^:type: .*/001_pgbench_pipeline_serializable)/
    > [16:51:10.467](0.000s) 
    > [16:51:10.467](0.000s) #   Failed test 'working \startpipeline with serializable stdout /(?^:type: .*/001_pgbench_pipeline_serializable)/'
    > #   at t/001_pgbench_with_server.pl line 845.
    > [16:51:10.467](0.000s) #                   ''
    > #     doesn't match '(?^:type: .*/001_pgbench_pipeline_serializable)'
    > [16:51:10.467](0.000s) not ok 229 - working \startpipeline with serializable stdout /(?^:actually processed: (\d+)/\1)/
    > [16:51:10.467](0.000s) 
    > [16:51:10.467](0.000s) #   Failed test 'working \startpipeline with serializable stdout /(?^:actually processed: (\d+)/\1)/'
    > #   at t/001_pgbench_with_server.pl line 845.
    > [16:51:10.467](0.000s) #                   ''
    > #     doesn't match '(?^:actually processed: (\d+)/\1)'
    > 
    > This ./configure switch has been removed in 17~, and, while I've not
    > analyzed the problem in details, I am wondering if this points to an
    > actual bug with \startpipeline in all branches.
    
    Thanks, I'll have a look.  I'm sure I didn't test any of this code with
    threading disabled :-)
    
    -- 
    Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
    "Saca el libro que tu religión considere como el indicado para encontrar la
    oración que traiga paz a tu alma. Luego rebootea el computador
    y ve si funciona" (Carlos Duclós)
    
    
    
    
  3. Re: Failure with pgbench and --disable-thread-safety in ~v16

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-12-04T11:17:37Z

    On 2023-Dec-04, Michael Paquier wrote:
    
    > While running some tests for 8984480b545d, I have noticed that the TAP
    > tests of pgbench fail when ~16 is compiled with
    > --disable-thread-safety:
    > [16:51:10.467](0.004s) not ok 227 - working \startpipeline with serializable status (got 1 vs expected 0)
    
    So the problem is that we do this:
    
    ./pgbench -c4 -j2 -t 10 -n -M prepared -f /home/alvherre/Code/pgsql-build/REL_16_STABLE/src/bin/pgbench/tmp_check/t_001_pgbench_with_server_main_data/001_pgbench_pipeline
    
    and get this error:
    pgbench: error: threads are not supported on this platform; use -j1
    
    So, the fix is just to remove the -j2 in the command line.  I'll do that
    in a jiffy.  There's no other test that uses -j, except the one
    specifically designed to test threads.
    
    -- 
    Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
    Bob [Floyd] used to say that he was planning to get a Ph.D. by the "green
    stamp method," namely by saving envelopes addressed to him as 'Dr. Floyd'.
    After collecting 500 such letters, he mused, a university somewhere in
    Arizona would probably grant him a degree.              (Don Knuth)
    
    
    
    
  4. Re: Failure with pgbench and --disable-thread-safety in ~v16

    Michael Paquier <michael@paquier.xyz> — 2023-12-04T22:22:00Z

    On Mon, Dec 04, 2023 at 12:17:37PM +0100, Alvaro Herrera wrote:
    > So, the fix is just to remove the -j2 in the command line.  I'll do that
    > in a jiffy.  There's no other test that uses -j, except the one
    > specifically designed to test threads.
    
    Thanks for the quick fix.
    --
    Michael