Closed lukeasrodgers closed 1 year ago
JFYI there is a proof of concept here https://github.com/alice-financial/pgslice/pull/1/commits/94bf29c27cbc68d400df7e09451a9f5f9d76ec88.
INSTEAD OF
triggers on views, so may be fine there as well.Because of the second two issues mentioned above, I probably will not bother putting together a PR against this repo, but if you are interested in the functionality I'm happy to rework it a bit (or happy to just have someone else do that).
Hi @lukeasrodgers, thanks for sharing! It's a neat pattern. I don't think it'll save space (since Postgres doesn't reclaim space on deletes), but does have the advantage of working with updates. I don't think I want to support another pattern right now, but may revisit in the future.
Thanks @ankane - you seem to be right about this not actually saving space. I had erroneously thought that even though postgres wouldn't "return" the disk space back to the OS, it would internally reuse it, but that's not the case. This doesn't even seem to happen if I issue manual VACUUM
commands during the fill
process.
First of all, thanks for this gem, it is very nearly exactly what I was looking for.
I'm curious if you have any interest in supporting an approach like the one outlined here: https://www.2ndquadrant.com/en/blog/partitioning-a-large-table-without-a-long-running-lock/
Basically, instead of the current approach (IIUC) of:
it would:
This seems to me to have two main advantages: