Skip to content

Fix (artifacts): "Argument list too long"

Vitaliy Kukharik requested to merge fix-argument-list-too-long into master

Fixed:

/usr/bin/bash: line 306: /usr/bin/curl: Argument list too long
[soft error, continue] Failed to upload "pg_stats.csv" to database.

Result:

Job: https://gitlab.com/postgres-ai/postgresql-consulting/tests-and-benchmarks/-/jobs/6016129711#L182

  • No error "Argument list too long"
postgres_ai=# select * from experiments order by created_at desc limit 1\gx
-[ RECORD 1 ]--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id                         | 018d41e1-e4e1-7239-a896-3f8beaac2285
created_at                 | 2024-01-25 18:28:59.745013+00
config                     | {"id": "25094117", "ref": "fix-argument-list-too-long", "variables": {"MODE": "dedicated", "HAPROXY": "false", "PGBOUNCER": "false", "TEST_RUNS": "{\"test 1\":{\"pre_configs\":[\"work_mem=100MB\"],\"pre_sql\":\"create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid)\",\"workload_pgbench\":\"pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres\"},\"test 2\":{\"pre_configs\":[\"work_mem=100MB\"],\"pre_sql\":\"create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid)\",\"workload_pgbench\":\"pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres\"}}\n", "SERVER_TYPE": "n2-standard-4", "VOLUME_SIZE": "100", "SERVER_IMAGE": "projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts", "SERVERS_COUNT": "1", "SERVER_FSTYPE": "ext4", "PG_STAT_KCACHE": "true", "PGBOUNCER_COUNT": "1", "POSTGRES_VERSION": "16", "SERVER_CLEANUP_TIMEOUT": "600", "CHATS_REQUESTED_MESSAGE_ID": "123"}}
chats_requested_message_id | 123
succeeded                  | t
gitlab_pipeline_url        | https://gitlab.com/postgres-ai/postgresql-consulting/tests-and-benchmarks/-/pipelines/1151933363
description_short          | 
description_long           | 
result_summary             | 
vector                     | 
is_public                  | t

postgres_ai=# 
postgres_ai=# select * from experiment_artifacts where experiment_id = '018d41e1-e4e1-7239-a896-3f8beaac2285' and artifact_type = 'result' order by created_at\gx
-[ RECORD 1 ]-+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
experiment_id | 018d41e1-e4e1-7239-a896-3f8beaac2285
run_label     | test 1
artifact_type | result
created_at    | 2024-01-25 18:29:00.019291+00
data_text     | [test 1|pre_configs] 2024-01-25 18:25:40 INFO: RUN TEST: "test 1"                                                                                                                        +
              | [test 1|pre_configs] 2024-01-25 18:25:40 INFO: Setting "work_mem" configuration with command: ALTER SYSTEM SET work_mem='100MB';                                                         +
              | [test 1|pre_configs] 2024-01-25 18:25:40 ALTER SYSTEM                                                                                                                                    +
              | [test 1|pre_configs] 2024-01-25 18:25:40 INFO: Show "work_mem" configuration                                                                                                             +
              | [test 1|pre_configs] 2024-01-25 18:25:40  work_mem                                                                                                                                       +
              | [test 1|pre_configs] 2024-01-25 18:25:40 ----------                                                                                                                                      +
              | [test 1|pre_configs] 2024-01-25 18:25:40  100MB                                                                                                                                          +
              | [test 1|pre_configs] 2024-01-25 18:25:40 (1 row)                                                                                                                                         +
              | [test 1|pre_configs] 2024-01-25 18:25:40                                                                                                                                                 +
              | [test 1|pre_sql] 2024-01-25 18:25:40 INFO: Executing pre_sql with command: create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid)                                  +
              | [test 1|pre_sql] 2024-01-25 18:25:48 CREATE INDEX                                                                                                                                        +
              | [test 1|workload_pgbench] 2024-01-25 18:25:57 INFO: Executing workload_pgbench with command: pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres                             +
              | [test 1|workload_pgbench] 2024-01-25 18:25:57 pgbench (16.1 (Ubuntu 16.1-1.pgdg22.04+1))                                                                                                 +
              | [test 1|workload_pgbench] 2024-01-25 18:26:07 progress: 10.0 s, 89.0 tps, lat 44.695 ms stddev 24.487, 0 failed                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:17 progress: 20.0 s, 91.8 tps, lat 43.366 ms stddev 22.680, 0 failed                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:27 progress: 30.0 s, 93.1 tps, lat 43.191 ms stddev 25.260, 0 failed                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:37 progress: 40.0 s, 98.6 tps, lat 40.538 ms stddev 22.847, 0 failed                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:47 progress: 50.0 s, 96.6 tps, lat 41.392 ms stddev 24.586, 0 failed                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 progress: 60.0 s, 100.8 tps, lat 39.660 ms stddev 23.379, 0 failed                                                                         +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 transaction type: <builtin: TPC-B (sort of)>                                                                                               +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 scaling factor: 100                                                                                                                        +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 query mode: simple                                                                                                                         +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 number of clients: 4                                                                                                                       +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 number of threads: 4                                                                                                                       +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 maximum number of tries: 1                                                                                                                 +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 duration: 60 s                                                                                                                             +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 number of transactions actually processed: 5703                                                                                            +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 number of failed transactions: 0 (0.000%)                                                                                                  +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 latency average = 42.075 ms                                                                                                                +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 latency stddev = 23.946 ms                                                                                                                 +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 initial connection time = 31.333 ms                                                                                                        +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 tps = 95.031326 (without initial connection time)                                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57 statement latencies in milliseconds and failures:                                                                                          +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.002           0  \set aid random(1, 100000 * :scale)                                                                            +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.001           0  \set bid random(1, 1 * :scale)                                                                                 +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.001           0  \set tid random(1, 10 * :scale)                                                                                +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.000           0  \set delta random(-5000, 5000)                                                                                 +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.069           0  BEGIN;                                                                                                         +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57         36.650           0  UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;                                     +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.159           0  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;                                                        +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.148           0  UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;                                      +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.127           0  UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;                                     +
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          0.097           0  INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);+
              | [test 1|workload_pgbench] 2024-01-25 18:26:57          4.827           0  END;                                                                                                           +
              | 
data_csv      | 
data_json     | 
-[ RECORD 2 ]-+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
experiment_id | 018d41e1-e4e1-7239-a896-3f8beaac2285
run_label     | test 2
artifact_type | result
created_at    | 2024-01-25 18:29:16.559087+00
data_text     | [test 2|pre_configs] 2024-01-25 18:27:09 INFO: RUN TEST: "test 2"                                                                                                                        +
              | [test 2|pre_configs] 2024-01-25 18:27:09 INFO: Setting "work_mem" configuration with command: ALTER SYSTEM SET work_mem='100MB';                                                         +
              | [test 2|pre_configs] 2024-01-25 18:27:09 ALTER SYSTEM                                                                                                                                    +
              | [test 2|pre_configs] 2024-01-25 18:27:09 INFO: Show "work_mem" configuration                                                                                                             +
              | [test 2|pre_configs] 2024-01-25 18:27:09  work_mem                                                                                                                                       +
              | [test 2|pre_configs] 2024-01-25 18:27:09 ----------                                                                                                                                      +
              | [test 2|pre_configs] 2024-01-25 18:27:09  100MB                                                                                                                                          +
              | [test 2|pre_configs] 2024-01-25 18:27:09 (1 row)                                                                                                                                         +
              | [test 2|pre_configs] 2024-01-25 18:27:09                                                                                                                                                 +
              | [test 2|pre_sql] 2024-01-25 18:27:09 INFO: Executing pre_sql with command: create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid)                                  +
              | [test 2|pre_sql] 2024-01-25 18:27:09 NOTICE:  relation "idx_pgbench_accounts_aid" already exists, skipping                                                                               +
              | [test 2|pre_sql] 2024-01-25 18:27:09 CREATE INDEX                                                                                                                                        +
              | [test 2|workload_pgbench] 2024-01-25 18:27:19 INFO: Executing workload_pgbench with command: pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres                             +
              | [test 2|workload_pgbench] 2024-01-25 18:27:19 pgbench (16.1 (Ubuntu 16.1-1.pgdg22.04+1))                                                                                                 +
              | [test 2|workload_pgbench] 2024-01-25 18:27:29 progress: 10.0 s, 87.8 tps, lat 45.266 ms stddev 26.876, 0 failed                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:27:39 progress: 20.0 s, 92.5 tps, lat 43.273 ms stddev 22.502, 0 failed                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:27:49 progress: 30.0 s, 93.2 tps, lat 42.968 ms stddev 26.050, 0 failed                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:27:59 progress: 40.0 s, 97.0 tps, lat 41.256 ms stddev 22.797, 0 failed                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:28:09 progress: 50.0 s, 97.3 tps, lat 40.976 ms stddev 24.606, 0 failed                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 progress: 60.0 s, 101.4 tps, lat 39.480 ms stddev 22.149, 0 failed                                                                         +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 transaction type: <builtin: TPC-B (sort of)>                                                                                               +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 scaling factor: 100                                                                                                                        +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 query mode: simple                                                                                                                         +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 number of clients: 4                                                                                                                       +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 number of threads: 4                                                                                                                       +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 maximum number of tries: 1                                                                                                                 +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 duration: 60 s                                                                                                                             +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 number of transactions actually processed: 5696                                                                                            +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 number of failed transactions: 0 (0.000%)                                                                                                  +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 latency average = 42.128 ms                                                                                                                +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 latency stddev = 24.243 ms                                                                                                                 +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 initial connection time = 28.179 ms                                                                                                        +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 tps = 94.922449 (without initial connection time)                                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19 statement latencies in milliseconds and failures:                                                                                          +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.002           0  \set aid random(1, 100000 * :scale)                                                                            +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.001           0  \set bid random(1, 1 * :scale)                                                                                 +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.001           0  \set tid random(1, 10 * :scale)                                                                                +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.000           0  \set delta random(-5000, 5000)                                                                                 +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.068           0  BEGIN;                                                                                                         +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19         36.752           0  UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;                                     +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.159           0  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;                                                        +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.148           0  UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;                                      +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.127           0  UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;                                     +
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          0.098           0  INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);+
              | [test 2|workload_pgbench] 2024-01-25 18:28:19          4.777           0  END;                                                                                                           +
              | 
data_csv      | 
data_json     | 

postgres_ai=# select count(*) from experiment_artifacts where experiment_id = '018d41e1-e4e1-7239-a896-3f8beaac2285';
 count 
-------
   146
(1 row)

Additionally:

  • Check how many artifacts have been successfully uploaded
Edited by Vitaliy Kukharik

Merge request reports