pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
press - pr: * fix link to full PR (was: EN, to be: RU)
2+ messages / 2 participants
[nested] [flat]

* press - pr: * fix link to full PR (was: EN, to be: RU)
@ 2009-06-30 16:43 User Nikolay <nikolay@pgfoundry.org>
  0 siblings, 0 replies; 2+ messages in thread

From: nikolay@pgfoundry.org @ 2009-06-30 16:43 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
* fix link to full PR (was: EN, to be: RU)

Modified Files:
--------------
    pr/releases/8.4/ru:
        release.txt.ru (r1.3 -> r1.4)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/press/pr/releases/8.4/ru/release.txt.ru?r1=1.3&r2=1....)




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Admit deferrable PKs into rd_pkindex, but flag them as such
@ 2024-03-08 15:33 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-03-08 15:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Admit deferrable PKs into rd_pkindex, but flag them as such

... and in particular don't return them as replica identity.

The motivation for this change is letting the primary keys be seen by
code that derives NOT NULL constraints from them, when creating
inheritance children; before this change, if you had a deferrable PK,
pg_dump would not recreate the attnotnull marking properly, because the
column would not be considered as having anything to back said marking
after dropping the throwaway NOT NULL constraint.

The reason we don't want these PKs as replica identities is that
replication can corrupt data, if the uniqueness constraint is
transiently broken.

Reported-by: Amul Sul <sulamul@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/CAAJ_b94QonkgsbDXofakHDnORQNgafd1y3Oa5QXfpQNJyXyQ7A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/270af6f0df764d326e1a7355f4ce10dc73b05dac

Modified Files
--------------
src/backend/replication/logical/relation.c     |  6 +-
src/backend/utils/cache/relcache.c             | 27 ++++++--
src/include/utils/rel.h                        |  3 +-
src/test/regress/expected/constraints.out      | 92 ++++++++++++++++++++++++++
src/test/regress/expected/publication.out      | 10 +++
src/test/regress/expected/replica_identity.out |  5 ++
src/test/regress/sql/constraints.sql           | 25 +++++++
src/test/regress/sql/publication.sql           |  9 +++
src/test/regress/sql/replica_identity.sql      |  4 ++
9 files changed, 170 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-03-08 15:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 16:43 press - pr: * fix link to full PR (was: EN, to be: RU) User Nikolay <nikolay@pgfoundry.org>
2024-03-08 15:33 pgsql: Admit deferrable PKs into rd_pkindex, but flag them as such Alvaro Herrera <alvherre@alvh.no-ip.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox