From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Table's REPLICATE IDENTITY : where is it kept? |
Date: | 2018-07-30 13:37:27 |
Message-ID: | 24602.1532957847@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> writes:
> I noticed that after changing a table's REPLICA IDENTITY via the ALTER TABLE 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 == RELKIND_RELATION ||
tbinfo->relkind == RELKIND_PARTITIONED_TABLE ||
tbinfo->relkind == RELKIND_MATVIEW) &&
tbinfo->relreplident != REPLICA_IDENTITY_DEFAULT)
{
if (tbinfo->relreplident == REPLICA_IDENTITY_INDEX)
{
/* nothing to do, will be set when the index is dumped */
}
else if (tbinfo->relreplident == REPLICA_IDENTITY_NOTHING)
{
appendPQExpBuffer(q, "\nALTER TABLE ONLY %s REPLICA IDENTITY NOTHING;\n",
qualrelname);
}
else if (tbinfo->relreplident == REPLICA_IDENTITY_FULL)
{
appendPQExpBuffer(q, "\nALTER TABLE ONLY %s REPLICA IDENTITY FULL;\n",
qualrelname);
}
}
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleas Mantzios | 2018-07-30 14:11:01 | Re: Table's REPLICATE IDENTITY : where is it kept? |
Previous Message | Achilleas Mantzios | 2018-07-30 10:44:49 | Table's REPLICATE IDENTITY : where is it kept? |