Re: Improve logical replication usability when tables lack primary keys
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Euler Taveira <euler@eulerto.com>, GRANT ZHOU <grantzhou@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Amit Kapila <amit.kapila16@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>,
shveta malik <shveta.malik@gmail.com>
Date: 2026-04-14T05:49:05Z
Lists: pgsql-hackers
On thinking more about the initial design with a GUC-based approach, I believe we already have a similar precedent where both a GUC and a table/column-level property coexist. For example, the default_toast_compression GUC allows setting a default compression method globally, while users can still override it at the column level during CREATE TABLE or ALTER TABLE. A similar approach could work in our case as well. Regarding the publication-level property, apart from the potential data-integrity issues discussed earlier, I also have another concern. If we introduce a publication-level fallback, we would effectively be deciding what gets logged in WAL for a particular table (i.e., whether to log REPLICA IDENTITY FULL) based on a publication parameter. This does not seem quite right to me. Shouldn't WAL logging typically be independent of publication configuration? Or do we already have a case where WAL logging behavior depends on publication-level properties? Thanks, Shveta
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add the notion of REPLICA IDENTITY for a table.
- 07cacba983ef 9.4.0 cited