{"id":27933464,"url":"https://github.com/timescale/promscale_extension","last_synced_at":"2025-05-07T04:58:56.034Z","repository":{"id":36959723,"uuid":"298563679","full_name":"timescale/promscale_extension","owner":"timescale","description":"[DEPRECATED] Tables, types and functions supporting Promscale","archived":true,"fork":false,"pushed_at":"2023-04-23T09:08:48.000Z","size":1821,"stargazers_count":37,"open_issues_count":94,"forks_count":18,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-07T04:58:51.338Z","etag":null,"topics":["deprecated"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timescale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-09-25T12:16:23.000Z","updated_at":"2024-12-03T08:24:13.000Z","dependencies_parsed_at":"2022-07-14T05:10:33.567Z","dependency_job_id":null,"html_url":"https://github.com/timescale/promscale_extension","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpromscale_extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpromscale_extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpromscale_extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fpromscale_extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timescale","download_url":"https://codeload.github.com/timescale/promscale_extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816948,"owners_count":21808704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecated"],"created_at":"2025-05-07T04:58:55.517Z","updated_at":"2025-05-07T04:58:56.032Z","avatar_url":"https://github.com/timescale.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **Warning**\n\u003e\n\u003e Promscale has been discontinued and is deprecated.\n\u003e\n\u003e The code in this repository is no longer maintained.\n\u003e\n\u003e [Learn more](https://github.com/timescale/promscale/issues/1836).\n\n# Promscale Extension\n\nFrom Promscale version 0.11.0, this [Postgres extension](https://www.postgresql.org/docs/12/extend-extensions.html)\nis an integral part of Promscale. It is required to be installed.\nCheck the [release notes](https://github.com/timescale/promscale/releases/tag/0.11.0)\nfor more details.\n\nThe extension plays two important roles: \n1. It manages the SQL data schema and [migrations](migration/README.md) that manipulate it.\n2. It encompasses code that runs within a database instance, both PL/pgSQL and native.\n\n## Motivation\n\nIt's fairly common for backend applications to manage their database schema via a migration\nsystem. Altering a table and adding an index are typical operations that come to mind.\nAs Promscale grew in scope and complexity we found ourselves defining custom data types,\naggregates and background jobs. Having the extension manage both the migration logic and\nvarious extensions helps to deal with situations when one depends on the other.\n\nYet, developer convenience is not the main reason this extension exists. It enables complex\noptimizations for both PromQL and SQL users. Let's have a look at two examples.\n\nCustom aggregates like `prom_rate`, `prom_delta` and a few others are implemented in Rust\nand enable Promscale to push corresponding PromQL down to native code that is executed\nwithin PostgreSQL. The alternatives are either transferring all the data to the Promscale\napplication and doing aggregation there, or a PL/pgSQL stored procedure. Both are substantially slower.\n\n[Support functions](https://www.postgresql.org/docs/current/xfunc-optimization.html) that\ntransparently rewrite some queries to reduce the amount of computation required or take\nadvantage of indices and tables specific to Promscale. For instance, the following query:\n\n```SQL\nSELECT trace_id\n    FROM ps_trace.span\n    WHERE\n            span_tags -\u003e 'pwlen' = '25'::jsonb\n        AND resource_tags -\u003e 'service.name' = '\"generator\"';\n```\n\nwill have an additional `InitPlan` stage that precomputes a set of matching tags,\nthen uses a GIN index on a private `_ps_trace.span` table. While the naive version\ncan only evaluate matching tags per row.\n\n## Requirements\n\nTo run the extension:\n\n- PostgreSQL version 12 or newer.\n\nTo compile the extension (see instructions below):\n\n- Rust compiler\n- PGX framework\n\n## Installation\n\n- [Precompiled OS Packages](./INSTALL.md#precompiled-os-packages)\n- [Docker images](./INSTALL.md#docker-images)\n- [Compile From Source](./INSTALL.md#compile-from-source)\n\n## Development\n\nTo quickly setup a development environment, see [DEVELOPMENT.md](DEVELOPMENT.md)\nTo understand more about how to write SQL migration files for this extension, consult [this](migration/README.md) guide.\nTo get a better understanding of our CI pipeline see [this document](.github/workflows/README.md).\n\n## Releasing\n\nA full checklist of the steps necessary to release a new version of the extension is available in [RELEASING.md](RELEASING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimescale%2Fpromscale_extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimescale%2Fpromscale_extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimescale%2Fpromscale_extension/lists"}