Skip to content

TimescaleDB

TimescaleDB #1056

Workflow file for this run

name: TimescaleDB
on:
schedule:
- cron: '0 22 * * *'
permissions:
contents: read
jobs:
pgspot:
runs-on: ubuntu-latest
steps:
- name: Setup python 3.10
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.10'
- name: Checkout pgspot
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install pgspot
run: |
python -m pip install .
- name: Checkout timescaledb
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'timescale/timescaledb'
path: 'timescaledb'
- name: Build timescaledb sqlfiles
run: |
cd timescaledb
./bootstrap
make -C build sqlfile # sqlupdatescripts
ls -la build/sql/timescaledb--*.sql
# time_bucket with offset is intentional without explicit search_path to allow for inlining
# _timescaledb_internal.policy_compression and _timescaledb_internal.policy_compression_execute
# do not have explicit search_path because this would prevent them doing transaction control
- name: Run pgspot
run: |
pgspot \
--proc-without-search-path 'extschema.time_bucket(bucket_width interval,ts timestamp,"offset" interval)' \
--proc-without-search-path 'extschema.time_bucket(bucket_width interval,ts timestamptz,"offset" interval)' \
--proc-without-search-path 'extschema.time_bucket(bucket_width interval,ts date,"offset" interval)' \
--proc-without-search-path 'extschema.recompress_chunk(chunk regclass,if_not_compressed boolean)' \
--proc-without-search-path '_timescaledb_internal.policy_compression(job_id integer,config jsonb)' \
--proc-without-search-path '_timescaledb_internal.policy_compression_execute(job_id integer,htid integer,lag anyelement,maxchunks integer,verbose_log boolean,recompress_enabled boolean)' \
--proc-without-search-path '_timescaledb_internal.cagg_migrate_execute_plan(_cagg_data _timescaledb_catalog.continuous_agg)' \
--proc-without-search-path '_timescaledb_functions.policy_compression(job_id integer,config jsonb)' \
--proc-without-search-path '_timescaledb_functions.policy_compression_execute(job_id integer,htid integer,lag anyelement,maxchunks integer,verbose_log boolean,recompress_enabled boolean,use_creation_time boolean,useam boolean)' \
--proc-without-search-path '_timescaledb_functions.cagg_migrate_execute_plan(_cagg_data _timescaledb_catalog.continuous_agg)' \
--proc-without-search-path 'extschema.cagg_migrate(cagg regclass,override boolean,drop_old boolean)' \
timescaledb/build/sql/timescaledb--*.sql
- name: Notify slack on failure
if: failure()
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: 'CEKV5LMK3'
slack-message: 'Nightly pgspot run for timescaledb repository failed. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Details>'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}