Postgres: no retention or partition management for events/attempts, causing unbounded growth
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by reading the Postgres partition definitions and migrations, including 000005_denormalize_attempts.up.sql, then review internal/logstore/pglogstore/README.md and docs/content/self-hosting/guides/event-delivery-log.mdoc. The issue asks for partition lifecycle management, a retention setting, a migration path for DEFAULT partitions, and documentation; agree on the design and supported migration behavior before implementation.
索引モデルが issue の本文から書いたものです。
説明
Summary
Outpost's Postgres events and attempts tables are declared as range-partitioned on time, but only DEFAULT partitions are created.
We could not find any code that creates, rotates, or drops time-based Postgres partitions, nor any built-in Postgres retention mechanism. This leaves operators implementing retention externally with row-by-row DELETE, with the associated dead-tuple, vacuum, and index-maintenance overhead.
This appears to be an incomplete part of the intended Postgres design rather than a new feature request.
Evidence in the source
The Postgres schema already uses time-based partitioning:
PRIMARY KEY (time, id)
) PARTITION BY RANGE (time);
CREATE TABLE events_default PARTITION OF events DEFAULT;
The same pattern is used for attempts.
More importantly, internal/logstore/pglogstore/README.md:367-373 explicitly lists:
Easy data retention (drop old partitions)
as a benefit of the time-based partitioning design.
However, we could not find runtime or migration code that creates, attaches, detaches, or drops those partitions.
The retention documentation also appears unfinished: docs/content/self-hosting/guides/event-delivery-log.mdoc:8 currently contains:
Need to talk about data retention and retention policies.
Request
It would be great to complete the Postgres retention design by adding:
- Automatic time-range partition management — create future partitions and drop expired ones.
- A Postgres retention setting implemented on top of those partitions.
- A supported migration path for existing installations where data is already in the DEFAULT partitions.
- Documentation describing the intended Postgres retention model.
Questions
- Is Postgres partition lifecycle management already planned or tracked?
- Is there a recommended migration path for existing DEFAULT partitions?
- Until native retention exists, what retention approach do you recommend for Postgres?
Small unrelated finding
The primary-key index on attempts_default still appears to be named deliveries_default_pkey.
000005_denormalize_attempts.up.sql:59-60 renames the table and partition but apparently not the constraint-backing index. Harmless, but slightly confusing when inspecting pg_stat_user_indexes.
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 70
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 50
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hookdeck/outpost のほかの issue
-
Docker image `v1.6.0` contains vulnerable Go stdlib and golang.org/x modules対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
hookdeck/outpost#1117 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
hookdeck/outpost の issue をすべて見る
似ている issue
-
Action Required: Fix Renovate Configuration対応中かも @thompson-tomo が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
open-telemetry/opentelemetry-collector#16170 ·
メンテナーはふだん 1 日以内に返信
-
automation awf compiler specifications
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
puppe1990/amarra-cais#342 ·
メンテナーはふだん 1 日以内に返信
-
replay: a run cancelled during environment setup is logged as an ERROR (Instrument drops the cancellation)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信