Re: pg_dump and restore without indexes

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Teja Jakkidi <teja(dot)jakkidi05(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_dump and restore without indexes
Date: 2024-06-04 18:27:08
Message-ID: 8fbe6cf1-99b8-4af2-a147-acd90cd21907@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Teja Jakkidi 2024-06-04 18:30:32 Re: pg_dump and restore without indexes
Previous Message Wetmore, Matthew (CTR) 2024-06-04 18:15:07 pg_dump and restore without indexes