Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sElyR-003X8I-Bz for pgsql-admin@arkaria.postgresql.org; Wed, 05 Jun 2024 08:26:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sElyR-006e6h-40 for pgsql-admin@arkaria.postgresql.org; Wed, 05 Jun 2024 08:26:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEYgw-001iCh-Pj for pgsql-admin@lists.postgresql.org; Tue, 04 Jun 2024 18:15:27 +0000 Received: from mx0b-000e5c01.pphosted.com ([67.231.157.188]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEYgl-002KyR-Iy for pgsql-admin@lists.postgresql.org; Tue, 04 Jun 2024 18:15:23 +0000 Received: from pps.filterd (m0170197.ppops.net [127.0.0.1]) by mx0b-000e5c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 454HFUDo005716 for ; Tue, 4 Jun 2024 14:15:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evernorth.com; h=content-transfer-encoding : content-type : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pod011016231234; bh=uDm7KAeT9HdA+xdxEu7kZhghWEuYwTmuGamRCKUI1vI=; b=bsdCdmUw4h8nCVBSPyp27QCRapH6gGCVl4uM/6T7DRVn3xrvY1uK26T2Sovccls1S1lY jz+lapbM0RcVliq1UrB9UOtvIMiXAV1YaObqYaAb2Jbb4l2iWQHtGIVuXf6KhbtOK9iU xfZre65V09MOZdOeuA1CmER/cM0bCZWdTGyp4I/4thVOcYr+dXzytxtP94rdP2Hp7uPS Il6HfHZv5NVSvs95yVNGMJ2Lg7RZZT8KoOe6ixsPfIEFDeBa3o4rpIJsj20xElouM9EO ER7IM0qJyV7GnaMUDg5p1RLIAJ/pJVj7CmTDlHS/7rR65RkphOdpxbMbdKGB0y4MnPdJ wg== Received: from express-scripts.com (mx0a-000e5c14.pphosted.com [148.163.133.209]) by mx0b-000e5c01.pphosted.com (PPS) with ESMTPS id 3yj758077w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 04 Jun 2024 14:15:12 -0400 Received: from m0206225.ppops.net (m0206225.ppops.net [127.0.0.1]) by pps.cigna (8.17.1.5/8.17.1.5) with ESMTP id 454IFA37019423 for ; Tue, 4 Jun 2024 13:15:10 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-000e5c14.pphosted.com (PPS) with ESMTPS id 3yfyxwwq6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 04 Jun 2024 13:15:09 -0500 Received: from m0206225.ppops.net (m0206225.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 454IF9Il019337 for ; Tue, 4 Jun 2024 13:15:09 -0500 Received: from eiaappxp0010.gid.prd.globalcore.com (lyncav03.cigna.com [170.48.19.149] (may be forged)) by mx0a-000e5c14.pphosted.com (PPS) with ESMTPS id 3yfyxwwq5r-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Jun 2024 13:15:09 -0500 Received: from cvlappxp20759.internal.cigna.com (HELO PS2PW1012188.accounts.root.corp) ([10.36.52.92]) by EIAAPPXP0010.gid.prd.globalcore.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 18:15:09 +0000 Received: from PS2PW1012186.accounts.root.corp (10.221.225.154) by PS2PW1012188.accounts.root.corp (10.221.225.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 4 Jun 2024 14:15:07 -0400 Received: from PS2PW1012186.accounts.root.corp ([fe80::ddfb:faf8:59ca:a8ec]) by PS2PW1012186.accounts.root.corp ([fe80::ddfb:faf8:59ca:a8ec%6]) with mapi id 15.02.1544.004; Tue, 4 Jun 2024 14:15:07 -0400 From: "Wetmore, Matthew (CTR)" To: Teja Jakkidi , pgsql-admin Thread-Topic: [EXTERNAL] pg_dump and restore without indexes Thread-Index: AQHatqaXF+c8rakR6U6h7HAysNVaarG36AWg Date: Tue, 4 Jun 2024 18:15:07 +0000 Message-ID: References: <45A8AB37-2C13-465D-9294-85CCA6C81C2D@gmail.com> In-Reply-To: <45A8AB37-2C13-465D-9294-85CCA6C81C2D@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.222.252.1] x-proofpoint-routing: 000e5c14 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected Subject: pg_dump and restore without indexes X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-04_09,2024-06-04_01,2024-05-17_01 X-Proofpoint-GUID: uGXfbW7zzanHAwyIe57smsrr2P0nRYC4 X-Proofpoint-ORIG-GUID: uGXfbW7zzanHAwyIe57smsrr2P0nRYC4 X-Connecting-IP: 148.163.133.209 X-External-Mail: True X-Content-Length: 3927 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-04_09,2024-06-04_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 mlxscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406040146 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is where custom scripting your dump comes in handy. Inside the shell script you can dump only what you want. Specifically line = by line. This is good because you don't have to touch the 'official dump' = and can have all your stuff editable and restorable if needed. Most large db's do this since order of operations can cause issues. a separate for loop for indexes, tables, views, sequences, etc. -----Original Message----- From: Teja Jakkidi =20 Sent: Tuesday, June 4, 2024 10:42 AM To: pgsql-admin Subject: [EXTERNAL] pg_dump and restore without indexes Hello Admins, I am trying to look for an option that can be added in pg_dump command to i= gnore all the indexes when creating the schema dump with data. Is there any such option that can be used in pg_dump? Or in pg_restore?=20 Please help with your inputs. Thanks in advance, J. Teja.