Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fk8Mn-0003Ho-DG for pgsql-admin@arkaria.postgresql.org; Mon, 30 Jul 2018 13:37:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fk8Ml-00065p-Un for pgsql-admin@arkaria.postgresql.org; Mon, 30 Jul 2018 13:37:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fk8Ml-00065i-NR for pgsql-admin@lists.postgresql.org; Mon, 30 Jul 2018 13:37:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fk8Me-00076P-5Z for pgsql-admin@lists.postgresql.org; Mon, 30 Jul 2018 13:37:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6UDbR8K024604; Mon, 30 Jul 2018 09:37:27 -0400 From: Tom Lane To: Achilleas Mantzios cc: pgsql-admin@lists.postgresql.org Subject: Re: Table's REPLICATE IDENTITY : where is it kept? In-reply-to: <1e6cc5ad-b84a-7c07-8c08-a4d0c3cdc938@matrix.gatewaynet.com> References: <1e6cc5ad-b84a-7c07-8c08-a4d0c3cdc938@matrix.gatewaynet.com> Comments: In-reply-to Achilleas Mantzios message dated "Mon, 30 Jul 2018 13:44:49 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24601.1532957847.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Jul 2018 09:37:27 -0400 Message-ID: <24602.1532957847@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Achilleas Mantzios writes: > I noticed that after changing a table's REPLICA IDENTITY via the ALTER T= ABLE command, this is not reflected in pg_dump. Really? There's certainly code in there that purports to do it: /* * dump properties we only have ALTER TABLE syntax for */ if ((tbinfo->relkind =3D=3D RELKIND_RELATION || tbinfo->relkind =3D=3D RELKIND_PARTITIONED_TABLE || tbinfo->relkind =3D=3D RELKIND_MATVIEW) && tbinfo->relreplident !=3D REPLICA_IDENTITY_DEFAULT) { if (tbinfo->relreplident =3D=3D REPLICA_IDENTITY_INDEX) { /* nothing to do, will be set when the index is dumped */ } else if (tbinfo->relreplident =3D=3D REPLICA_IDENTITY_NOTHING) { appendPQExpBuffer(q, "\nALTER TABLE ONLY %s REPLICA IDENTITY N= OTHING;\n", qualrelname); } else if (tbinfo->relreplident =3D=3D REPLICA_IDENTITY_FULL) { appendPQExpBuffer(q, "\nALTER TABLE ONLY %s REPLICA IDENTITY F= ULL;\n", qualrelname); } } regards, tom lane