pg_largeobject is empty after droping a table with BLOBS
0
votes
0
answers
29
views
So we have a springboot app using a postrgressql db.
We used to have some data that were mapped as CLOBs and BLOBs.
Since we decided to move away from large objects we migrated the database and while doing so, we created some backup tables in case something went wrong. Example from liquibase
CREATE TABLE data_files_backup (LIKE data_files );
INSERT INTO data_files_backup SELECT * FROM data_files ;
UPDATE data_files SET context_new = lo_get(data_files.context::BIGINT) where data_files.context is not null;
So now only the backups have Large Objects stored in them.
Now that this stage is over, i want to drop every backup table.
There comes my confusion. So the changeset is like this
DROP TABLE IF EXISTS data_files_backup;
.....
other tables
.....
Backend starts and i wanted to clean up the db and what i got is this
$ vacuumlo -n -U MYNAME -p 5438 CENTRALDB
Password:
Connected to database "CENTRALDB"
Test run: no large objects will be removed!
Would remove 0 large objects from database "CENTRALDB".
Upon looking to the pg_largeobject in the pg_catalog i realized that it is completely empty.
pg_largeobject_metadata is also empty.
I thought you had to run vacuumlo for a cleanup. Have i done something wrong ? When did the pg_largeobject got emptied?
Asked by physicsuser
(1 rep)
Nov 5, 2024, 08:29 AM