pg.ddx.io  pgpartman/pg_partman GitHub issues and pull requests  
help / color / mirror / Atom feed
From: sanjay-motorq (@sanjay-motorq) <noreply+sanjay-motorq@github.com>
To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>
Subject: [pgpartman/pg_partman] discussion #877: Full table scan of default partition during partman maintenance (ATTACH PARTITION)
Date: Fri, 18 Sep 2026 06:26:34 +0000
Message-ID: <gh-pgpartman-pg_partman-877@github.com> (raw)

Problem: We have a usecase where we partition our tables by timestamp and there are cases where data can arrive late. This data, if it lies outside the range of our partitions will go to the default partition. We cannot afford to drop this data immediately or change the partition key.
We have a way to clean up the default partition once the data is no longer required.

The issue here is that, partman maintenance takes too long due to the amount of data in default partition. Since this locks the table, our queries fail during this time window.

Proposal: If the goal is to check the default table for any conflicting rows (that might belong in the new partition), why cant we use an index scan instead of a full table scan ?
What are the blockers to go with this approach ?

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgpartman-pg_partman-877@github.com>
Permalink:  ../gh-pgpartman-pg_partman-877@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox