![]() ![]() "This currently includes information about database users and groups, tablespaces, and properties such as access permissions that apply to databases as a whole. If a database name is specified, pgrestore connects to that database and restores archive contents directly into the database. According to the installation guide after the installation has finished there should be shortcuts for StackBuilder, pgAdmin3 and psql in the Application folder of Postgres: You will also find additional shortcuts to run pgAdmin, the psql command line interface and to access the PostgreSQL documentation. How can I have the same result* of a pg_dumpall dump without recreating the indices when loading the dumpall_clean.sql file?Ī pg_dumpall -without-index would be nice. pgrestore is a utility for restoring a PostgreSQL database from an archive created by pgdump in one of the non-plain-text formats. Initially I made 8 FOR loops (to run in parallel) to go through the partitions, and created an index by moving a partition to a faster tablespace (SSD), create the index, then move the table and the index back to the default tablespace. This takes day s since each index is created one by one.Īs I have enough resources and I know which indices have to be created, I would perfer to do this step after the dump has been restored. The cluster has thousands of partitions each with several million rows and two indices (one BTREE and one GIST). Once this is done the file is around 1.2TB in size and I can load it to the new 10.3 instance with psql -U postgres -h localhost -p 5433 < dumpall_clean.sqlĪs I learned the indicies are not backed up like tables are, they are simply recreated, and that is my problem. pg_dumpall -U postgres -h localhost -p 5432 -clean -file=dumpall_clean.sql So far I thought pg_dumpall is a good option. ![]() I am attempting to migrate from Postgres 9.6 to 10.3 and during the restore each index is recreated one by one - this is a problem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |