You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you got any ideas how to handle partitioned tables? I'm thinking of our usecase, but I believe it to be quite common. Range-based partitioning by timestamp column. In our case, monthly partitions for some tables.
Dump at least dumps the partitions, which isn't that useful. We also use sqlc which then ends up creating structs for the partitions.
The text was updated successfully, but these errors were encountered:
createtableevents (
created timestamp with time zonenot null default now(),
event text
) partition by range (created);
createtableevents_p20250101 partition of events for valuesfrom ('2025-01-01 00:00:00Z') to ('2025-02-01 00:00:00Z');
Fixing the dates in the schema migrations does not make sense. But they will exist in pg when the schema gets dumped. Partitions don't really describe the schema, the shape of the data. They are an implementation detail and should be managed separately from migrations.
So I propose a way to either not dump tables that are partitions of other tables or some other way to ignore specific tables (with a regex?) to get the same end result.
Have you got any ideas how to handle partitioned tables? I'm thinking of our usecase, but I believe it to be quite common. Range-based partitioning by timestamp column. In our case, monthly partitions for some tables.
Dump at least dumps the partitions, which isn't that useful. We also use sqlc which then ends up creating structs for the partitions.
The text was updated successfully, but these errors were encountered: