From 6fb4a9f60295b343312918c69d2acb68f54cdf96 Mon Sep 17 00:00:00 2001 From: Arthur Nascimento Date: Fri, 10 Nov 2023 15:42:51 -0300 Subject: [PATCH 1/2] add Bluefin documentation to ASP pages --- .../advanced_storage_pack/configuring.mdx | 2 +- .../advanced_storage_pack/index.mdx | 14 +++++++- .../advanced_storage_pack/installing.mdx | 2 +- .../rel_notes/asp_1.2.1_rel_notes.mdx | 10 ++++++ .../advanced_storage_pack/rel_notes/index.mdx | 1 + .../advanced_storage_pack/using.mdx | 32 +++++++++++++++++++ 6 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/asp_1.2.1_rel_notes.mdx diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/configuring.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/configuring.mdx index 97d43803c40..48d843547c5 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/configuring.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/configuring.mdx @@ -3,7 +3,7 @@ title: Configuring Advanced Storage Pack navTitle: Configuring --- -Place the extension module implementing the custom TAM in `shared_preload_libraries` so that it loads early during Postgres startup. This step is needed so that the extension is available before the table based on the given TAM is accessed for the first time. For example, update the parameter in `postgresql.conf` with `autocluster` or `refadata`: +Place the extension module implementing the custom TAM in `shared_preload_libraries` so that it loads early during Postgres startup. This step is needed so that the extension is available before the table based on the given TAM is accessed for the first time. For example, update the parameter in `postgresql.conf` with `autocluster`, `refdata`, or `bluefin`: ```ini shared_preload_libraries = '$libdir/' diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx index 75a96252f82..612ebc9be4b 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx @@ -13,7 +13,19 @@ EDB Advanced Storage Pack provides advanced storage options for Postgres databas For tables whose access patterns you know, you might prefer a targeted TAM that makes different tradeoffs. For instance, if a table has a specific usage pattern, you might consider using a specialized TAM that is designed to enhance that usage pattern. -EnterpriseDB offers two TAMs in the Advanced Storage Pack. +EnterpriseDB offers three TAMs in the Advanced Storage Pack. + +## Bluefin + +Bluefin is designed to provide data compaction and delta compression, which makes it particularly useful for storing time-series data, common in IoT and monitoring use cases. + +In its design, UPDATEs and DELETEs are not permitted operations. This allows for a much smaller tuple header, as well as for tuples to be stored as compressed deltas of other tuples, and eagerly freezing of pages as soon as the page is full. The result is that Bluefin tables accept only INSERTs, but they are able to reach a much higher density of tuples per page, leading to faster reads on such append-only tables. + +Due to the lack of DELETE operations, Bluefin is best used together with table partitioning features, allowing older data to be pruned by dropping older, time-range-based, partitions. + +Bluefin is only available for database versions 15 and newer, since it depends on features introduced in PostgreSQL 15. + +See [Bluefin example](using/#bluefin-example) for an example use case. ## Autocluster diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/installing.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/installing.mdx index 550b7aa2fe5..35d8592c385 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/installing.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/installing.mdx @@ -3,7 +3,7 @@ title: Installing Advanced Storage Pack navTitle: Installing --- -The Advanced Storage Pack is supported on the same platforms as the Postgres distribution you're using. Support for Advanced Storage Pack starts with Postgres 12. For details, see: +The Advanced Storage Pack is supported on the same platforms as the Postgres distribution you're using. Support for Advanced Storage Pack starts with Postgres 12 for Autocluster and Refdata, and with Postgres 15 for Bluefin. For details, see: - [EDB Postgres Advanced Server Product Compatibility](https://www.enterprisedb.com/platform-compatibility#epas) diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/asp_1.2.1_rel_notes.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/asp_1.2.1_rel_notes.mdx new file mode 100644 index 00000000000..8b361ce64e1 --- /dev/null +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/asp_1.2.1_rel_notes.mdx @@ -0,0 +1,10 @@ +--- +title: Release notes for Advanced Storage Pack version 1.2.1 +navTitle: "Version 1.2.1" +--- + +This release of Advanced Storage Pack includes: + +| Type | Description | +| ------- | --------------------------------------- | +| Feature | Bluefin is released for PG/PGE/EPAS 15+ | diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/index.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/index.mdx index 1802a3e9ad8..594e168610d 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/index.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/rel_notes/index.mdx @@ -11,6 +11,7 @@ about the release that introduced the feature. | Version | Release Date | | --------------------------- | ------------ | +| [1.2.1](asp_1.2.1_rel_notes) | 09 Nov 2023 | | [1.0.0](asp_1.0.0_rel_notes) | 30 Nov 2022 | diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx index 0be70dd73d6..902dc5d981d 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx @@ -5,6 +5,38 @@ navTitle: Using The following are scenarios where the EDB Advanced Storage Pack TAMs are useful. +## Bluefin example + +Bluefin is best when used with time-range partitioning. The example below shows a table containing logs of trucks, that get inserted periodically when each truck provides updates of its status. + +```sql +CREATE TABLE truck_logs ( + ts TIMESTAMP WITH TIME ZONE, + truck_id INTEGER, + latitude FLOAT, + longitude FLOAT, + elevation INTEGER, + velocity FLOAT, + characteristics JSON, + data JSON +) PARTITION BY RANGE (ts) + USING bluefin; +``` + +Each partition contains one month of data: + +```sql +CREATE TABLE "truck_logs_2023-09" + PARTITION OF truck_logs FOR VALUES FROM ('2023-09-01') TO ('2023-10-01') + USING bluefin; +``` + +One single index is created on each partition: + +```sql +CREATE INDEX "i_truck_logs_2023-09_truck_id_ts" ON "truck_logs_2023-09"(truck_id, ts); +``` + ## Refdata example A scenario where Refdata is useful is creating a reference table of all From 08a2475cd0c8a8e5a8ad51751a8942a0f6beb02c Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan <126472455+djw-m@users.noreply.github.com> Date: Thu, 23 Nov 2023 13:46:55 +0000 Subject: [PATCH 2/2] Apply suggestions from copy-edit review Co-authored-by: Betsy Gitelman --- advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx | 6 +++--- advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx index 612ebc9be4b..28397f918e4 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx @@ -19,11 +19,11 @@ EnterpriseDB offers three TAMs in the Advanced Storage Pack. Bluefin is designed to provide data compaction and delta compression, which makes it particularly useful for storing time-series data, common in IoT and monitoring use cases. -In its design, UPDATEs and DELETEs are not permitted operations. This allows for a much smaller tuple header, as well as for tuples to be stored as compressed deltas of other tuples, and eagerly freezing of pages as soon as the page is full. The result is that Bluefin tables accept only INSERTs, but they are able to reach a much higher density of tuples per page, leading to faster reads on such append-only tables. +In its design, UPDATE and DELETE operations aren't permitted. This design allows for a much smaller tuple header. It also allows for tuples to be stored as compressed deltas of other tuples and eagerly freezing of pages as soon as the page is full. The result is that Bluefin tables accept only INSERTs, but they are able to reach a much higher density of tuples per page. This ability leads to faster reads on such append-only tables. -Due to the lack of DELETE operations, Bluefin is best used together with table partitioning features, allowing older data to be pruned by dropping older, time-range-based, partitions. +Due to the lack of DELETE operations, Bluefin is best used together with table partitioning features. This combination allows older data to be pruned by dropping older, time-range-based, partitions. -Bluefin is only available for database versions 15 and newer, since it depends on features introduced in PostgreSQL 15. +Bluefin is available only for database versions 15 and later, since it depends on features introduced in PostgreSQL 15. See [Bluefin example](using/#bluefin-example) for an example use case. diff --git a/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx b/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx index 902dc5d981d..7c4832fca7c 100644 --- a/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx +++ b/advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx @@ -7,7 +7,7 @@ The following are scenarios where the EDB Advanced Storage Pack TAMs are useful. ## Bluefin example -Bluefin is best when used with time-range partitioning. The example below shows a table containing logs of trucks, that get inserted periodically when each truck provides updates of its status. +Bluefin is best when used with time-range partitioning. This example shows a table containing logs of trucks that get inserted periodically when each truck provides updates of its status. ```sql CREATE TABLE truck_logs (