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 1rcSWG-000FPf-CM for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 15:58:56 +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 1rcSWE-000clH-Gj for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Feb 2024 15:58:55 +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 1rcSWE-000cl8-7i for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2024 15:58:54 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rcSWC-0001qc-8w for pgsql-hackers@lists.postgresql.org; Tue, 20 Feb 2024 15:58:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 41KFwoeH186810; Tue, 20 Feb 2024 10:58:50 -0500 From: Tom Lane To: Fabrice Chapuis cc: PostgreSQL Hackers Subject: Re: pg_restore problem to load constraints with tables In-reply-to: References: Comments: In-reply-to Fabrice Chapuis message dated "Tue, 20 Feb 2024 15:44:47 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <186808.1708444730.1@sss.pgh.pa.us> Date: Tue, 20 Feb 2024 10:58:50 -0500 Message-ID: <186809.1708444730@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Fabrice Chapuis writes: > When a table is reloaded wit pg_restore, it is recreated without indexes or > constraints. There are automatically skipped. Is there a reason for this? [ shrug ] That's how the -t switch is defined. If you want something else, you can use the -l and -L switches to pick out a custom collection of objects to restore. regards, tom lane