Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mnF8e-00049d-HZ for pgsql-general@arkaria.postgresql.org; Wed, 17 Nov 2021 07:13:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mnF8d-00043y-6P for pgsql-general@arkaria.postgresql.org; Wed, 17 Nov 2021 07:13:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mnF8c-00043o-Qb for pgsql-general@lists.postgresql.org; Wed, 17 Nov 2021 07:13:46 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mnF8W-0008LA-FB for pgsql-general@lists.postgresql.org; Wed, 17 Nov 2021 07:13:45 +0000 Received: by mail-pf1-x42f.google.com with SMTP id g18so1797925pfk.5 for ; Tue, 16 Nov 2021 23:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:to:content-language:from :subject; bh=xpnCSbypkW5XO0lPjUESxQHlBGmZc2DR4BUxzYh0dCs=; b=XYeJ+WQViBS0dkIZ3Ll7DXzl9XX+vyyjCYy7uOB1U1jmbWVoOrVSOHN0SFpt556fsN 3M6tnGqE0uCgIQrPmlCUvJTFT0nBjvz19oW8COC/3alDPvH3Q8QaT4IfYzJvua4fYZM8 lAP2itM212/V+L0n0ATmxzG6YplJb9b09DBJRi3Mzq41rEo649dCo4/xiFUOixiA6i+o vmxcHqSNnAvL+3UxV89KwlVMDhjpRLNEcID8A7SnkBnMuZC+OLVXXI+5t4jQUJqT0KIZ OButRQrBe4h/dYNWB1bMECxG/C3ranv8o4jM3Bls0E8/awJTNDC/VDGZzuT4NoD+3/tb jxeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:to :content-language:from:subject; bh=xpnCSbypkW5XO0lPjUESxQHlBGmZc2DR4BUxzYh0dCs=; b=w/3OcO03N5xrlG3TGc9Kxgw5bKScewbr/RgmN82rXtGy6zg7MPJB3VOpNnA3InAMcK iPUvYLieriBd8RMlMmRlRZHvltEs4Tfo6ofe/EI1juOZaGDQ+C+1TwAr56hXi8UMzYrS /AZkRBBdn1rVlV/VHZcbHI+W7vKd9Okylr2Pjg8KxDRVhFtbon7ebFO2ka+m8dTaxcKK E1vUZ+BExKRCVAp7qLHVU8CCgBSkLQ5pD34mytMqXywzRPtwIgNSH8nhiBISfjhM+vCS 1v2UHDuAZX4S4ixTqQlEwnepSK6/tY6hbNcUioizrNN/QEZntgTX4f1qjp3mglWTMgDX tS1A== X-Gm-Message-State: AOAM5327xRc+rwHHkoOSZnh/1qkmeinZZmH//SJljEUtpijhDb/YASMW A2qkmUf5i6pZ4qRq9XHb6aZrdXN0LHw= X-Google-Smtp-Source: ABdhPJyKt3UbCxUj1uH6G+/cGtQnE9Z3BXS3jVJcMkIOukMjvNTVZgVyU4GyslwXHSw78NwhYDb1Mg== X-Received: by 2002:a65:5bc8:: with SMTP id o8mr3807565pgr.92.1637133218923; Tue, 16 Nov 2021 23:13:38 -0800 (PST) Received: from ?IPV6:2405:6e00:1ef3:200:507b:609:63ce:3435? ([2405:6e00:1ef3:200:507b:609:63ce:3435]) by smtp.gmail.com with ESMTPSA id co4sm4409185pjb.2.2021.11.16.23.13.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 23:13:38 -0800 (PST) Content-Type: multipart/alternative; boundary="------------sF8mJJrVcqfcY9QjlTrTPM0p" Message-ID: <06fbb436-d81b-4428-029c-91e6f1181ed5@gmail.com> Date: Wed, 17 Nov 2021 17:13:35 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 To: pgsql-general@lists.postgresql.org Content-Language: en-US From: Akheel Ahmed Subject: create all indexes and triggers in a schema after bulk load List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------sF8mJJrVcqfcY9QjlTrTPM0p Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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? Please advise Thanks --------------sF8mJJrVcqfcY9QjlTrTPM0p Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

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?

Please advise

Thanks

--------------sF8mJJrVcqfcY9QjlTrTPM0p--