pg-workload 0.4.2__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pg_workload-0.4.2/src/pg_workload.egg-info → pg_workload-0.6.1}/PKG-INFO +18 -6
- {pg_workload-0.4.2 → pg_workload-0.6.1}/README.md +17 -5
- pg_workload-0.6.1/THIRD_PARTY_NOTICES.md +64 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/pyproject.toml +1 -1
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/__init__.py +1 -1
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/README.md +52 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/generator.py +757 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/initialization-constraints.json +86 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/initialization-indexes.json +250 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/imdb/profile.yml +4 -5
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/01_company_catalog.sql +17 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/02_people_by_keyword.sql +19 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/imdb/sql/03_keyword_trends.sql +4 -4
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/04_genre_cast.sql +14 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/05_join_stress.sql +22 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/imdb-schema.sql +175 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/initialization-finalize.sql +1 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_1.sql +87 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_10.sql +72 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_11.sql +136 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_12.sql +102 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_13.sql +135 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_14.sql +133 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_15.sql +143 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_16.sql +114 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_17.sql +143 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_18.sql +104 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_19.sql +169 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_2.sql +69 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_20.sql +131 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_21.sql +134 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_22.sql +215 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_23.sql +132 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_24.sql +110 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_25.sql +145 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_26.sql +160 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_27.sql +170 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_28.sql +202 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_29.sql +208 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_3.sql +65 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_30.sql +192 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_31.sql +180 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_32.sql +41 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_33.sql +160 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_4.sql +61 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_5.sql +79 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_6.sql +141 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_7.sql +106 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_8.sql +108 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/imdb/sql/select_9.sql +136 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/README.md +53 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/generator.py +291 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/initialization-constraints.json +351 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/initialization-indexes.json +262 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pagila/profile.yml +10 -5
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/sql/01_select.sql +109 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/sql/02_insert.sql +191 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/sql/03_update.sql +108 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/sql/04_delete.sql +17 -0
- pg_workload-0.6.1/src/pg_workload/bundled/profiles/pagila/sql/initialization-finalize.sql +18 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pagila/sql/pagila-schema.sql +85 -774
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock_spec_symbols/sql/01_workload.sql +1 -1
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/common.py +2 -0
- pg_workload-0.6.1/src/pg_workload/initialization.py +148 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/orchestration.py +4 -1
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/runner.py +18 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1/src/pg_workload.egg-info}/PKG-INFO +18 -6
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload.egg-info/SOURCES.txt +42 -2
- {pg_workload-0.4.2 → pg_workload-0.6.1}/tests/test_docker_postgres18.py +204 -1
- pg_workload-0.6.1/tests/test_initialization.py +112 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/tests/test_workload.py +76 -2
- pg_workload-0.4.2/THIRD_PARTY_NOTICES.md +0 -37
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/README.md +0 -32
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/generator.py +0 -121
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/sql/01_company_catalog.sql +0 -16
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/sql/02_people_by_keyword.sql +0 -18
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/sql/04_genre_cast.sql +0 -14
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/sql/05_join_stress.sql +0 -22
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/sql/indexes.sql +0 -20
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/imdb/sql/schema.sql +0 -69
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/pagila/README.md +0 -32
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/pagila/generator.py +0 -193
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/pagila/sql/01_select.sql +0 -264
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/pagila/sql/02_insert.sql +0 -273
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/pagila/sql/03_update.sql +0 -149
- pg_workload-0.4.2/src/pg_workload/bundled/profiles/pagila/sql/04_delete.sql +0 -27
- {pg_workload-0.4.2 → pg_workload-0.6.1}/LICENSE +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/MANIFEST.in +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/setup.cfg +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/__main__.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/assets.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/bloat_vacuum/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/bloat_vacuum/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/bloat_vacuum/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/bloat_vacuum/sql/01_churn.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/bloat_vacuum/sql/accounts-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/emulate_errors/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/emulate_errors/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/emulate_errors/sql/01_workload.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/emulate_errors/sql/schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/jsonb_docs/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/jsonb_docs/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/jsonb_docs/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/jsonb_docs/sql/01_write.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/jsonb_docs/sql/02_read.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/jsonb_docs/sql/docs-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/many_objects/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/many_objects/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/many_objects/sql/01_workload.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/many_objects/sql/prepare_schema_01.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/many_objects/sql/prepare_schema_02.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/sql/01_ingest.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/sql/02_read_recent.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/sql/03_read_history.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/partition_aging/sql/events-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pss_overflow/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pss_overflow/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pss_overflow/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pss_overflow/sql/01_workload.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/pss_overflow/sql/pss_overflow-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/sql/01_enqueue.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/sql/02_dequeue.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/sql/03_settle.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/queue_skip_locked/sql/queue-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock/sql/01_workload.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock/sql/indexes.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock/sql/stock-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock_spec_symbols/README.md +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock_spec_symbols/generator.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock_spec_symbols/profile.yml +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock_spec_symbols/sql/indexes.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/profiles/simple_stock_spec_symbols/sql/stock-schema.sql +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/bundled/schema/pg_workload-v1.schema.json +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/cli.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/config.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/control.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/logging.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/pg_client.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/profiles.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/resources.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/scheduler.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload/state.py +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload.egg-info/dependency_links.txt +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload.egg-info/entry_points.txt +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload.egg-info/requires.txt +0 -0
- {pg_workload-0.4.2 → pg_workload-0.6.1}/src/pg_workload.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pg-workload
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: PostgreSQL workload emulator for diagnostic and observability testing
|
|
5
5
|
Author-email: O2eg <oleg.ispu@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -191,7 +191,11 @@ instead of `--passfile`; `PGPASSWORD` is accepted only as an admin-password comp
|
|
|
191
191
|
`prepare-db --recreate` drops only the selected workload database after terminating its sessions;
|
|
192
192
|
it does not drop the workload role.
|
|
193
193
|
Unless `--extensions` is supplied, it creates both `pg_stat_statements` and
|
|
194
|
-
`pg_buffercache`,
|
|
194
|
+
`pg_buffercache`, and also installs `pg_stat_kcache` and `pg_wait_sampling` when
|
|
195
|
+
the server provides them. Managed `pg_stand` images include and preload the required
|
|
196
|
+
libraries, and new databases inherit the extensions from `template1`. An explicit
|
|
197
|
+
`--extensions` list replaces both default lists. Optional extension choices are
|
|
198
|
+
included in the machine plan.
|
|
195
199
|
|
|
196
200
|
## Targets
|
|
197
201
|
|
|
@@ -225,7 +229,7 @@ Use `--bin-dir /path/to/postgresql/bin` when client binaries are outside
|
|
|
225
229
|
| `simple_stock` | Write-heavy CRUD over related stock tables | synthetic Python generator |
|
|
226
230
|
| `simple_stock_spec_symbols` | Identifier, Unicode, and parser edge cases | synthetic Python generator |
|
|
227
231
|
| `imdb` | Movie-domain analytical joins and skew | synthetic Python generator |
|
|
228
|
-
| `pagila` |
|
|
232
|
+
| `pagila` | Pagila OLTP with a 50/25/20/5 script mix | synthetic Python generator |
|
|
229
233
|
| `many_objects` | Metadata-heavy schemas and partitions | scale-aware SQL object creation |
|
|
230
234
|
| `emulate_errors` | Intentional SQL errors | SQL seed rows only |
|
|
231
235
|
| `pss_overflow` | `pg_stat_statements` churn | scaled Python generator; extension/preload required |
|
|
@@ -236,8 +240,8 @@ Use `--bin-dir /path/to/postgresql/bin` when client binaries are outside
|
|
|
236
240
|
|
|
237
241
|
No profile requires a dump, CSV file, or network download. The Pagila schema is redistributed
|
|
238
242
|
under its upstream license; see `THIRD_PARTY_NOTICES.md`. Its rows are generated locally. The
|
|
239
|
-
bundled `imdb` profile
|
|
240
|
-
|
|
243
|
+
bundled `imdb` profile contains a full synthetic 21-table movie-domain model, 38 analytical
|
|
244
|
+
scripts, and 113 SELECT variants; it contains no IMDB source data.
|
|
241
245
|
|
|
242
246
|
Every profile directory contains a `README.md` with the scenario description, its jobs, the
|
|
243
247
|
pg_diag sections it is meant to exercise, and scale/observation guidance.
|
|
@@ -352,7 +356,7 @@ pg-workload run --profile simple_stock --pgbench-transactions 100
|
|
|
352
356
|
|---|---|
|
|
353
357
|
| `simple_stock` | 150,000 product groups; 1,000,000 SKUs; 1,000,000 stock rows |
|
|
354
358
|
| `simple_stock_spec_symbols` | the same cardinalities with hostile and Unicode identifiers/values |
|
|
355
|
-
| `imdb` | 10,000 companies; 100,000 people; 100,000 titles;
|
|
359
|
+
| `imdb` | 21 tables; 10,000 companies; 100,000 people; 100,000 titles; ~2,000,000 related rows |
|
|
356
360
|
| `pagila` | 600 customers; 1,000 films; 4,500 inventory; 16,000 rentals; 16,500 payments |
|
|
357
361
|
| `queue_skip_locked` | 20,000 pending + 5,000 done queue tasks |
|
|
358
362
|
| `jsonb_docs` | 50,000 JSONB documents |
|
|
@@ -380,6 +384,14 @@ to `psql`, so generated rows never pass through repository files. Because a loca
|
|
|
380
384
|
generator can execute arbitrary code with the runner account, only run profiles from a trusted
|
|
381
385
|
project directory.
|
|
382
386
|
|
|
387
|
+
`pagila` and `imdb` use the generators and SQL from `pg_perf_bench` v0.6.1, adapted for
|
|
388
|
+
scheduled workloads. Their local `pg_workload.initialization` loader commits bounded data
|
|
389
|
+
batches (100,000 rows by default), then creates indexes and constraints and analyzes every
|
|
390
|
+
table. It uses the selected `psql` and keeps normal durability settings. These two generators
|
|
391
|
+
also accept `--batch-rows N` when called directly; changing batch size preserves generated
|
|
392
|
+
values (apart from wall-clock `last_update` timestamps). Failed initialization stops the
|
|
393
|
+
command; reinstall the profile to recreate its schema and retry.
|
|
394
|
+
|
|
383
395
|
## Desired-state scheduler
|
|
384
396
|
|
|
385
397
|
The scheduler runs in the foreground and owns only its child workload processes. It does not
|
|
@@ -152,7 +152,11 @@ instead of `--passfile`; `PGPASSWORD` is accepted only as an admin-password comp
|
|
|
152
152
|
`prepare-db --recreate` drops only the selected workload database after terminating its sessions;
|
|
153
153
|
it does not drop the workload role.
|
|
154
154
|
Unless `--extensions` is supplied, it creates both `pg_stat_statements` and
|
|
155
|
-
`pg_buffercache`,
|
|
155
|
+
`pg_buffercache`, and also installs `pg_stat_kcache` and `pg_wait_sampling` when
|
|
156
|
+
the server provides them. Managed `pg_stand` images include and preload the required
|
|
157
|
+
libraries, and new databases inherit the extensions from `template1`. An explicit
|
|
158
|
+
`--extensions` list replaces both default lists. Optional extension choices are
|
|
159
|
+
included in the machine plan.
|
|
156
160
|
|
|
157
161
|
## Targets
|
|
158
162
|
|
|
@@ -186,7 +190,7 @@ Use `--bin-dir /path/to/postgresql/bin` when client binaries are outside
|
|
|
186
190
|
| `simple_stock` | Write-heavy CRUD over related stock tables | synthetic Python generator |
|
|
187
191
|
| `simple_stock_spec_symbols` | Identifier, Unicode, and parser edge cases | synthetic Python generator |
|
|
188
192
|
| `imdb` | Movie-domain analytical joins and skew | synthetic Python generator |
|
|
189
|
-
| `pagila` |
|
|
193
|
+
| `pagila` | Pagila OLTP with a 50/25/20/5 script mix | synthetic Python generator |
|
|
190
194
|
| `many_objects` | Metadata-heavy schemas and partitions | scale-aware SQL object creation |
|
|
191
195
|
| `emulate_errors` | Intentional SQL errors | SQL seed rows only |
|
|
192
196
|
| `pss_overflow` | `pg_stat_statements` churn | scaled Python generator; extension/preload required |
|
|
@@ -197,8 +201,8 @@ Use `--bin-dir /path/to/postgresql/bin` when client binaries are outside
|
|
|
197
201
|
|
|
198
202
|
No profile requires a dump, CSV file, or network download. The Pagila schema is redistributed
|
|
199
203
|
under its upstream license; see `THIRD_PARTY_NOTICES.md`. Its rows are generated locally. The
|
|
200
|
-
bundled `imdb` profile
|
|
201
|
-
|
|
204
|
+
bundled `imdb` profile contains a full synthetic 21-table movie-domain model, 38 analytical
|
|
205
|
+
scripts, and 113 SELECT variants; it contains no IMDB source data.
|
|
202
206
|
|
|
203
207
|
Every profile directory contains a `README.md` with the scenario description, its jobs, the
|
|
204
208
|
pg_diag sections it is meant to exercise, and scale/observation guidance.
|
|
@@ -313,7 +317,7 @@ pg-workload run --profile simple_stock --pgbench-transactions 100
|
|
|
313
317
|
|---|---|
|
|
314
318
|
| `simple_stock` | 150,000 product groups; 1,000,000 SKUs; 1,000,000 stock rows |
|
|
315
319
|
| `simple_stock_spec_symbols` | the same cardinalities with hostile and Unicode identifiers/values |
|
|
316
|
-
| `imdb` | 10,000 companies; 100,000 people; 100,000 titles;
|
|
320
|
+
| `imdb` | 21 tables; 10,000 companies; 100,000 people; 100,000 titles; ~2,000,000 related rows |
|
|
317
321
|
| `pagila` | 600 customers; 1,000 films; 4,500 inventory; 16,000 rentals; 16,500 payments |
|
|
318
322
|
| `queue_skip_locked` | 20,000 pending + 5,000 done queue tasks |
|
|
319
323
|
| `jsonb_docs` | 50,000 JSONB documents |
|
|
@@ -341,6 +345,14 @@ to `psql`, so generated rows never pass through repository files. Because a loca
|
|
|
341
345
|
generator can execute arbitrary code with the runner account, only run profiles from a trusted
|
|
342
346
|
project directory.
|
|
343
347
|
|
|
348
|
+
`pagila` and `imdb` use the generators and SQL from `pg_perf_bench` v0.6.1, adapted for
|
|
349
|
+
scheduled workloads. Their local `pg_workload.initialization` loader commits bounded data
|
|
350
|
+
batches (100,000 rows by default), then creates indexes and constraints and analyzes every
|
|
351
|
+
table. It uses the selected `psql` and keeps normal durability settings. These two generators
|
|
352
|
+
also accept `--batch-rows N` when called directly; changing batch size preserves generated
|
|
353
|
+
values (apart from wall-clock `last_update` timestamps). Failed initialization stops the
|
|
354
|
+
command; reinstall the profile to recreate its schema and retry.
|
|
355
|
+
|
|
344
356
|
## Desired-state scheduler
|
|
345
357
|
|
|
346
358
|
The scheduler runs in the foreground and owns only its child workload processes. It does not
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## Pagila
|
|
4
|
+
|
|
5
|
+
The packaged `pagila` profile includes a modified copy of the Pagila schema
|
|
6
|
+
from <https://github.com/devrimgunduz/pagila>. Pagila's data dump is not
|
|
7
|
+
distributed in the source repository or Python package. The profile uses an
|
|
8
|
+
original local generator to create synthetic rows and requires no upstream data.
|
|
9
|
+
|
|
10
|
+
Copyright (c) Devrim Gündüz <devrim@gunduz.org>
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
|
|
30
|
+
## Synthetic movie-domain workload
|
|
31
|
+
|
|
32
|
+
The bundled `imdb` profile includes SQL query shapes migrated and adapted from
|
|
33
|
+
the predecessor `pg_workload_generator` implementation. Its data generator is
|
|
34
|
+
local and deterministic. No source IMDB dataset, CSV archive, or downloaded row
|
|
35
|
+
data is included in the source distribution or wheel.
|
|
36
|
+
|
|
37
|
+
## pg_perf_bench profile sources
|
|
38
|
+
|
|
39
|
+
The Pagila and IMDb schemas, load plans, index/constraint definitions and workload SQL
|
|
40
|
+
are adapted from `pg_perf_bench` v0.6.1, commit
|
|
41
|
+
`5eec23ce4c0edf3001bdbdb70339406221a3c903`, <https://github.com/O2eg/pg_perf_bench>.
|
|
42
|
+
The psql loader and scheduled-run adaptations are maintained in pg_workload.
|
|
43
|
+
|
|
44
|
+
MIT License
|
|
45
|
+
|
|
46
|
+
Copyright (c) 2023 Tantor Labs
|
|
47
|
+
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
49
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
50
|
+
in the Software without restriction, including without limitation the rights
|
|
51
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
52
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
53
|
+
furnished to do so, subject to the following conditions:
|
|
54
|
+
|
|
55
|
+
The above copyright notice and this permission notice shall be included in all
|
|
56
|
+
copies or substantial portions of the Software.
|
|
57
|
+
|
|
58
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
59
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
60
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
61
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
62
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
63
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
64
|
+
SOFTWARE.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# imdb
|
|
2
|
+
|
|
3
|
+
Analytical read-only workload over a synthetic movie-domain model: multi-way joins,
|
|
4
|
+
aggregations, selective lookups, correlated subgraphs, and skewed popularity distributions.
|
|
5
|
+
It is a workload generator rather than a benchmark: the goal is to keep PostgreSQL busy and
|
|
6
|
+
produce varied plans and statistics for `auto_explain`, `pg_stat_statements`, and DBA tooling.
|
|
7
|
+
No IMDB source rows, CSV files, archives, or network downloads are required.
|
|
8
|
+
|
|
9
|
+
The schema, generator and all 38 SQL scripts come from `pg_perf_bench` v0.6.1
|
|
10
|
+
(commit `5eec23ce4c0edf3001bdbdb70339406221a3c903`), with a local psql loader.
|
|
11
|
+
The workload queries are unchanged.
|
|
12
|
+
|
|
13
|
+
## Objects (at scale 1)
|
|
14
|
+
|
|
15
|
+
- The full 21-table relational shape used by the earlier profile, including alternate names and
|
|
16
|
+
titles, characters, company and role types, complete-cast metadata, indexed movie attributes,
|
|
17
|
+
person information, and movie links.
|
|
18
|
+
- 10,000 companies; 100,000 people; 50,000 characters; 20,000 keywords; 100,000 titles; and about
|
|
19
|
+
2 million fact, relationship, and attribute rows.
|
|
20
|
+
- Deterministic synthetic anchor rows cover the names, years, countries, notes, roles, keywords,
|
|
21
|
+
genres, ratings, and link types selected by every bundled query family.
|
|
22
|
+
- Independent deterministic hash streams choose participants, companies, keywords and
|
|
23
|
+
attribute types/values, avoiding cyclic correlations between a film and its relationships.
|
|
24
|
+
- Identifiers are bigint. The local loader recreates the schema and commits bounded data
|
|
25
|
+
batches, then builds primary keys, join/filter indexes and constraints and runs `ANALYZE`
|
|
26
|
+
on all 21 tables. It preserves normal logging and server durability settings.
|
|
27
|
+
- The generator accepts `--batch-rows` (default 100,000); batch size does not change the data.
|
|
28
|
+
After a loading failure, reinstall the profile to recreate its schema and retry.
|
|
29
|
+
|
|
30
|
+
## Jobs
|
|
31
|
+
|
|
32
|
+
| Job | Type | Interval | What it does |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| `analytical_selects` | pgbench | 60 s | 38 scripts and 113 SELECT variants: five compact analytics plus 33 multi-join families |
|
|
35
|
+
|
|
36
|
+
The `select_1.sql` through `select_33.sql` files retain the diverse join shapes of the previous
|
|
37
|
+
implementation. Their predicates target values deliberately generated by `generator.py`, so the
|
|
38
|
+
aggregate results describe existing synthetic rows instead of repeatedly exercising empty joins.
|
|
39
|
+
|
|
40
|
+
## What to watch in pg_diag
|
|
41
|
+
|
|
42
|
+
- `sql_workload` — top statements by total/mean time with real join plans
|
|
43
|
+
- `object_workload` — sequential vs index scan split on fact tables
|
|
44
|
+
- `buffer_cache` — relation caching behaviour under repeated analytical reads
|
|
45
|
+
- `snapshot_charts_db` — read I/O rates during the observation window
|
|
46
|
+
|
|
47
|
+
## Recommended scale and observation window
|
|
48
|
+
|
|
49
|
+
- Scale 1 for meaningful planning; scale 0.1 still keeps join selectivity sensible. Very small
|
|
50
|
+
scales retain the complete anchor dataset and at least 1,000 titles for CI and training.
|
|
51
|
+
- 5–10 minutes of scheduled runs; analytical queries dominate `pg_stat_statements`
|
|
52
|
+
quickly because the job interval is 60 s.
|