From: Akheel Ahmed <akheel.mailing.list@gmail.com>
To: depesz@depesz.com
Cc: pgsql-general@lists.postgresql.org
Subject: Re: create all indexes and triggers in a schema after bulk load
Date: Wed, 17 Nov 2021 17:18:57 +1000
Message-ID: <32c591d4-a8c4-f4eb-d45f-5084932e4059@gmail.com> (raw)
In-Reply-To: <20211117071643.GA11260@depesz.com>
References: <06fbb436-d81b-4428-029c-91e6f1181ed5@gmail.com>
<20211117071643.GA11260@depesz.com>
thanks. will give it a try
On 17/11/2021 5:16 pm, hubert depesz lubaczewski wrote:
> On Wed, Nov 17, 2021 at 05:13:35PM +1000, Akheel Ahmed wrote:
>> Hi Group
>>
>> I am looking at doing a CDC-based upgrade using the following steps:
>>
>>
>> 1. pg_dump schema on source, but exclude indexes and triggers
>>
>> 2. recreate schema on target
>>
>> 3. Do a full load from source to target
>>
>> 4. Recreate all the indexes and triggers on the target
>>
>> The migration will automatically switch from full load to CDC when all
>> tables are fully loaded.
>>
>> Is there a way to just recreate all indexes and triggers using a separate
>> pg_dump on source to capture the ddl and then run it on the target?
> There is no need for separate pg_dump.
>
> Just dump once, with -Fc, or (better) -Fd, and then use pg_restore
> -l/-L.
>
> depesz
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: akheel.mailing.list@gmail.com, depesz@depesz.com
Subject: Re: create all indexes and triggers in a schema after bulk load
In-Reply-To: <32c591d4-a8c4-f4eb-d45f-5084932e4059@gmail.com>
References: <06fbb436-d81b-4428-029c-91e6f1181ed5@gmail.com> <20211117071643.GA11260@depesz.com> <32c591d4-a8c4-f4eb-d45f-5084932e4059@gmail.com>
* 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