Martijn van Oosterhout <klep...@svana.org> writes: > That said, I still don't see how you can enforce a unique index over > multiple segments over something other than the partition key while > still allowing quick dropping of segments. If you can fix that you can > make it work for the current inheritence-style partitioning.
Well the Primary Key and the Physical Map Index do not need to be on the same set of columns. >> If you happen to drop a part of the data that fits in one or more >> segments (and with a decent fillfactor you need less than 1GB to get >> there), then you can unlink() whole files at a time. That would be the >> goal here. > > I feel uncomfortable with the "happen to". You can add the magic too, > but for scripting purposes I'd feel better if it could be done via DDL > also. That way typos don't end up being 5 day queries all of a sudden. If the data fills less than a segment then you can't unlink() the file, you have to mark the tuples / pages as free space. If you have a partial index matching the whole portion of data you're removing, you can still drop it before hand — or maybe the system can be instructed to do so? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers