How to correctly dumpall a PostgreSQL cluster when in the newer version one extension is separated into 2 extensions
0
votes
2
answers
33
views
I have a PostgreSQL version 10 and a PostGIS extension. In this old version of PostgreSQL, the PostGIS has also support for raster. But in the newer versions of PostGIS, the raster support in a separate extension called: postgis_raster.
Thus, we wont have this line in our dumpall file:
CREATE EXTENSION postgis_raster;
And when I restore it it tells me it does not recognize the raster type!
My file is very big if I do not zip it before storing it on the disk.
If I zip it, I wont be able to change the lines in the file to add this extension to the dump file manually.
I was thinking to do a pgdumpall with --global-only flag. Then, later dump each DB one by one using pgdump.
However, I was afraid that I may miss a detail from my DB cluster.
Is there a way to ask the pgdumpall to consider that postgis_raster is a separate extension and should be added to the dump file?
How can I safely dump and restore my cluster?
Asked by milad
(101 rep)
Jul 29, 2025, 03:09 PM
Last activity: Jul 31, 2025, 07:47 AM
Last activity: Jul 31, 2025, 07:47 AM