Closed jensens closed 3 years ago
I haven't encountered that before. It would seem to be something data-dependent. I don't suppose the database is something you could share?
That assumes the pack tables had been in a good state before beginning. If you haven't packed this database in awhile, but had packed it at some point in the past using an older version of RelStorage, that might not be the case — RelStorage relies on some sorting/de-duplication happening in the database, but in the past I don't think it did. You could test this by truncating the pack tables, then trying the pack again:
$ psql …
relstoragetest=> TRUNCATE TABLE object_refs_added, object_ref, pack_object CASCADE;
TRUNCATE TABLE
relstoragetest=> commit;
This fixed it, thanks so much! It looks like the pack tables were broken. I just have no idea why.
Glad it was an easy fix!
It looks like the pack tables were broken. I just have no idea why.
Presumably it was packed a long time ago with an older version of RelStorage. Some state in the pack tables is left behind on purpose, but apparently across large version differences that can be an issue.
I have a Plone 5.2.3 setup and use RelStorage in a Docker Swarm setup. It is using the latest v12 image from https://hub.docker.com/_/postgres (which is a 12.6 currently) - unmodified.
I run RelStorage in history free mode and is configured for historical reasons with a separate blobstorage like so:
Until today I never tried to pack the DB after the migration to Python 3. It does not grow much here due to history free mode.
But now I got:
I have no clue whats going on. Any idea whats wrong?
Further I checked a zodbconvert to filestorage which works fine.