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 1sEYsQ-0029kM-TL for pgsql-admin@arkaria.postgresql.org; Tue, 04 Jun 2024 18:27:21 +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 1sEYsQ-001jgA-1i for pgsql-admin@arkaria.postgresql.org; Tue, 04 Jun 2024 18:27:18 +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 1sEYsP-001jek-Ji for pgsql-admin@lists.postgresql.org; Tue, 04 Jun 2024 18:27:17 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEYsM-002L2l-WB for pgsql-admin@lists.postgresql.org; Tue, 04 Jun 2024 18:27:17 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4Vtzb241cVz9spJ; Tue, 4 Jun 2024 20:27:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1717525630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1pccLV03h7yDMng9qaHxambj89s6br8rqHarvYUHB6A=; b=pFluKp1g+Ar8TDiGP+mL9lo/aVIYaI4RIhWU/Y/2MfGue1tmc2lCwbm7O9DWtjJHqZBO7n qL7neNzXPU6nKHPrQi3M2iNKwsh8tX/JubSd27qOIAcP0bb/2RjhGCIr8OGrK3COsArsPl tMdbr1x/jAjt3J2wvF4jUM3nK55jI0rotjoTAGUORNpXAny5NbaE6lwUmB/rG7EiWQ3AXz Q3H1S+AY5z3bXkJGGgSHjPIKb5Mnn+y2LcQyx5j7/nyIpKXdbOWgD1KtcDSqeNemHrDf3d SwFIG9lnXNLFa/PwpYplZ+AC6yiQrPxP77e/RwyDZoZfJyp7uUGkNrGvNqRB/w== Date: Tue, 4 Jun 2024 20:27:08 +0200 From: Erik Wienhold To: Teja Jakkidi Cc: pgsql-admin Subject: Re: pg_dump and restore without indexes Message-ID: <8fbe6cf1-99b8-4af2-a147-acd90cd21907@ewie.name> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Vtzb241cVz9spJ List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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