Postgres: no retention or partition management for events/attempts, causing unbounded growth
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 1.1k
- Forks
- 70
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 56
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hookdeck/outpost
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
hookdeck/outpost#1117 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
Todos los issues de hookdeck/outpost
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
praetorian-inc/augustus#334 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
TestTOMLBigFileParsesInLinearTime: a 1s wall-clock bound on a 3 MB parse fails under load (1.27s)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100