Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Conversation

@jgpruitt
Copy link
Contributor

@jgpruitt jgpruitt commented Sep 29, 2022

Description

Currently, the temp tables used for ingestion are named using a transient value. This PR substitutes the transient value for the metric_id. This change creates a temp table specific to the metric and database session, allowing it to be reused.

The temp table is currently created with ON COMMIT DROP, which requires that the temp table be recreated with each transaction. This incurs significant pg_catalog churn/bloat. A corresponding PR will be made in the extension to change this to ON COMMIT DELETE ROWS.

Merge requirements

Please take into account the following non-code changes that you may need to make with your PR:

  • CHANGELOG entry for user-facing changes
  • Updated the relevant documentation

@jgpruitt jgpruitt added the Improvement Improvements to the existing features label Sep 29, 2022
@jgpruitt jgpruitt self-assigned this Sep 29, 2022
@jgpruitt jgpruitt force-pushed the john/ingest-temp-tables branch from 807ee93 to a5e35d0 Compare September 29, 2022 17:55
@jgpruitt
Copy link
Contributor Author

corresponding extension PR timescale/promscale_extension#526

@jgpruitt jgpruitt marked this pull request as ready for review September 29, 2022 18:16
@jgpruitt jgpruitt requested a review from a team as a code owner September 29, 2022 18:16
@jgpruitt jgpruitt requested review from JamesGuthrie and harkishen and removed request for a team September 29, 2022 18:16
@cevian cevian added this to the 0.15.0 milestone Sep 30, 2022
Currently, the temp tables used for ingestion are named using a
transient value. This PR substitutes the transient value for the
metric_id. This change creates a temp table that is specific to
the metric and database session which allows it to be reused.

The temp table is currently created with ON COMMIT DROP, which
requires that the temp table be recreated with each transaction.
This incurs significant pg_catalog churn/bloat. A corresponding
PR will be made in the extension to change this to
ON COMMIT DELETE ROWS.
@jgpruitt jgpruitt force-pushed the john/ingest-temp-tables branch from a5e35d0 to 9798e4a Compare September 30, 2022 16:18
@jgpruitt jgpruitt merged commit 7e76605 into master Sep 30, 2022
@jgpruitt jgpruitt deleted the john/ingest-temp-tables branch September 30, 2022 16:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Improvement Improvements to the existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants