SectorLabs / django-postgres-extra

Bringing all of PostgreSQL's awesomeness to Django.
MIT License
695 stars 96 forks source link

Use lock friendly queries for table management in pgpartition command #229

Closed rpradal closed 10 months ago

rpradal commented 10 months ago

Hello,

On my projet i have a table that is under heavyload. I use time based partitioning to archive old data. Sometimes when running the pgpartition command to create future partitions i end up with a lock error message. After having a look at the psql partition documentation, it looks like a more lock friendly way of creating a partition is to create to partition first and the attach it later. Do you think that this is something that could be considered in this library ?

thanks

Photonios commented 10 months ago

Yes, that can be considered. Feel free to open a PR 🎉