Skip to content

Commit

Permalink
Merge pull request #4998 from tureba/bluefin
Browse files Browse the repository at this point in the history
add Bluefin documentation to ASP pages
  • Loading branch information
djw-m authored Nov 23, 2023
2 parents 2c0dbd6 + 08a2475 commit 9d51c79
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/<extension_name>'
Expand Down
14 changes: 13 additions & 1 deletion advocacy_docs/pg_extensions/advanced_storage_pack/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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. This combination allows older data to be pruned by dropping older, time-range-based, partitions.

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.

## Autocluster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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+ |
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


Expand Down
32 changes: 32 additions & 0 deletions advocacy_docs/pg_extensions/advanced_storage_pack/using.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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. 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 (
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
Expand Down

0 comments on commit 9d51c79

Please sign in to comment.