From: Erik Wienhold <ewie@ewie.name>
To: Teja Jakkidi <teja.jakkidi05@gmail.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: pg_dump and restore without indexes
Date: Tue, 4 Jun 2024 20:27:08 +0200
Message-ID: <8fbe6cf1-99b8-4af2-a147-acd90cd21907@ewie.name> (raw)
In-Reply-To: <E700253C-6D81-4A9C-AE9C-52E0E6F6EAA2@gmail.com>
References: <dcd0950f-facc-4646-9442-0feb8f92b525@ewie.name>
<E700253C-6D81-4A9C-AE9C-52E0E6F6EAA2@gmail.com>
On 2024-06-04 19:58 +0200, Teja Jakkidi wrote:
> Also, is there a way we can remap schema or table during restore like
> how we have an option to remap in Oracle?
Not in pg_dump or pg_restore. Maybe some third-party tool, but I don't
know.
I had to do this in the past and just renamed the schemas after
restoring into a new database. Using a find-and-replace on the SQL dump
might also work (maybe with a clever regexp) but it's not foolproof if
the search matches false-positives in data segments or string literals.
--
Erik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ewie@ewie.name, teja.jakkidi05@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump and restore without indexes
In-Reply-To: <8fbe6cf1-99b8-4af2-a147-acd90cd21907@ewie.name>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox