Rich Shepard <[email protected]> writes:
> I know that data formats can change with postgres version increases so my
> question is: can I use dumpall in the 12.7 version and move that to the host
> running 18.6 since the output is a text .sql file?
You could, but better practice is to use pg_dump[all] from the newer
version to take a dump from the old server. The idea behind that
recommendation is that the newer pg_dump may contain bug fixes that
aren't in the 12.7 version (especially noting that 12.7 is many
minor releases short of v12's EOL).
Keep in mind also that 6 years is a lot of time for things to change.
I expect your dump will probably load okay, but test your application
for compatibility.
regards, tom lane