Sign inSign up

bexhoma/loader_tpch_refresh_postgresql

By bexhoma

•Updated about 7 hours ago

Image
0

7.5K

bexhoma/loader_tpch_refresh_postgresql repository overview

⁠TPC-H Refresh Loader - PostgreSQL

Applies TPC-H RF1 (INSERT) and RF2 (DELETE) operations to a PostgreSQL database. Reads pre-generated update files from /data/tpch-refresh/SF<SF>/ on the PVC. Runs as the main container (benchmark_run=2) of the refresh benchmarker job, in parallel with the query-stream benchmarker (benchmark_run=1).

See images/tpch_refresh/README.md⁠ for the shared refresh-stream pipeline design.

⁠Environment variables

VariableDefaultDescription
SF1TPC-H scaling factor
TPCH_REFRESH_STREAMS1Number of RF1+RF2 pairs to apply
TPCH_REFRESH_STREAM_OFFSET0Start from set OFFSET+1
STORE_RAW_DATA11 = read from /data/tpch-refresh/SF<SF>/; 0 = /tmp/...
BEXHOMA_HOSTwww.example.comPostgreSQL host
BEXHOMA_PORT5432PostgreSQL port
BEXHOMA_USERpostgresPostgreSQL user
BEXHOMA_PASSWORDpostgresPostgreSQL password
BEXHOMA_DATABASEtpchTarget database
BEXHOMA_SCHEMApublicTarget schema
BEXHOMA_CONNECTIONpostgresqlConnection name (Redis counter key)
BEXHOMA_EXPERIMENT12345Experiment identifier
BEXHOMA_EXPERIMENT_RUN1Run number within experiment
BEXHOMA_CLIENT1Client round number
BEXHOMA_BENCHMARK_RUN2Parallel benchmark index (2 = refresh stream)

⁠Execution flow

  1. Compute FIRST_SET = OFFSET+1, LAST_SET = OFFSET+STREAMS.
  2. Determine destination_raw (same logic as the generator).
  3. Sync: decrement job counter bexhoma-benchmarker-podcount-job-<CONNECTION>-<EXPERIMENT>, poll until ? 0.
  4. Sync: decrement round counter bexhoma-benchmarker-podcount-round-<EXPERIMENT_RUN>-<CLIENT>-<CONFIGURATION>-<EXPERIMENT>, poll until ? 0. This ensures the refresh stream starts at the same moment as the parallel query stream (benchmark_run=1).
  5. For each set K from FIRST_SET to LAST_SET:
    • RF1: \COPY orders FROM orders.tbl.uK then \COPY lineitem FROM lineitem.tbl.uK
    • RF2: bulk DELETE lineitem and orders rows whose orderkeys are listed in delete.K (temp table + DELETE ... IN (SELECT ...) via heredoc)
  6. Emit BEXHOMA_DURATION, BEXHOMA_START, BEXHOMA_END.

Tag summary

Content type

Image

Digest

sha256:081fa427a…

Size

70.1 MB

Last updated

about 7 hours ago

docker pull bexhoma/loader_tpch_refresh_postgresql