While successful and without error, this database maintenance took a little over 200% of the time we expected and communicated.
In analyzing the performance of the dump/restore process necessary for upgrading major versions of our database, we noted that one table in particular (our largest) took nearly four times longer than in initial testing of the procedure while all other tables performed as observed in tests.
We identified two differences between our trial runs and the actual final migration:
We have nothing to indicate that changing our codebase to stop database writes would have impacted performance, and are reasonably confident that using different versions of the dump/restore utilities may have impacted our estimates.
We will consider other methods for this kind of maintenance in the future and apologize for the extended duration of this maintenance. After our previous major database upgrade in December 2021, we are satisfied with the minimized impact on installers in this maintenance window but have a goal of reducing the duration that PyPI needs to be in read-only in the future.