Re: Non-text mode for pg_dumpall
| От | tushar |
|---|---|
| Тема | Re: Non-text mode for pg_dumpall |
| Дата | |
| Msg-id | CAC6VRoY6Vpm01hOnp2F=gyNt_f6rCz9kuESmgP524mQnruEVJQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Non-text mode for pg_dumpall (Mahendra Singh Thalor <mahi6run@gmail.com>) |
| Ответы |
Re: Non-text mode for pg_dumpall
|
| Список | pgsql-hackers |
On Thu, Dec 11, 2025 at 9:39 PM Mahendra Singh Thalor <mahi6run@gmail.com> wrote:
Here, in our case, as the cluster already has a role with the current
user in restore, we are reporting error "pg_restore: error: could not
execute query: ERROR: role "role" already exists" and after this
error, restore is exiting.
If you restore using a different role, then you will not get any error
and the full cluster will be restored. I will add some handling to
ignore the "CREATE ROLE current_user" command in pg_restore.
Thanks Mahendra, Could you please also add some error message for this below
pg_restore command:
postgres=# create table t(n int);
CREATE TABLEpostgres=# insert into t values (1),(10),(100);
INSERT 0 3
Perform pg_dump: ./pg_dump -Ft -f a.a1 postgres
Perform pg_restore: /pg_restore -Ft a.a1 -f -C -v
pg_restore: creating TABLE "public.t"
pg_restore: processing data for table "public.t"
[edb@1a1c15437e7c bin]$ ./psql postgres
psql (19devel)
Type "help" for help.
postgres=# \dt
Did not find any tables.
postgres=#
pg_restore: creating TABLE "public.t"
pg_restore: processing data for table "public.t"
[edb@1a1c15437e7c bin]$ ./psql postgres
psql (19devel)
Type "help" for help.
postgres=# \dt
Did not find any tables.
postgres=#
regards,
В списке pgsql-hackers по дате отправления: