Add test for temporal referential integrity
This commit adds an isolation test showing that temporal foreign keys do
not permit referential integrity violations under concurrency, like
fk-snapshot-2. You can show that the test fails by passing false for
detectNewRows to ri_PerformCheck in ri_rest
Avoid unexpected changes of CurrentResourceOwner and CurrentMemoryContext
Users of logical decoding can encounter an unexpected change of
CurrentResourceOwner and CurrentMemoryContext. The problem is that,
unlike other call sites of RollbackAndReleaseCurrentSubTransaction(), in
reorderbuffer.c we
Improve comment about snapshot macros
The comment mistakenly had "the others" for "the other", but this
commit also reorders the comment so it matches the macros below. Now we
describe the levels in increasing strictness. In addition, it seems
easier to follow if we introduce one level at a time
Fill testing gap for possible referential integrity violation
This commit adds a missing isolation test for (non-PERIOD) foreign keys.
With REPEATABLE READ, one transaction can insert a referencing row while
another deletes the referenced row, and both see a valid state. But
after they have commi
CREATE STATISTICS: improve misleading error message
I think the error message for a different condition was inadvertently
copied.
This problem seems to have been introduced by commit a4d75c86bf15.
Author: Álvaro Herrera
Reported-by: jian he
Reviewed-by: Tom Lane
Backpatch-through: 14
CREATE STATISTICS: improve misleading error message
I think the error message for a different condition was inadvertently
copied.
This problem seems to have been introduced by commit a4d75c86bf15.
Author: Álvaro Herrera
Reported-by: jian he
Reviewed-by: Tom Lane
Backpatch-through: 14
CREATE STATISTICS: improve misleading error message
I think the error message for a different condition was inadvertently
copied.
This problem seems to have been introduced by commit a4d75c86bf15.
Author: Álvaro Herrera
Reported-by: jian he
Reviewed-by: Tom Lane
Backpatch-through: 14
CREATE STATISTICS: improve misleading error message
I think the error message for a different condition was inadvertently
copied.
This problem seems to have been introduced by commit a4d75c86bf15.
Author: Álvaro Herrera
Reported-by: jian he
Reviewed-by: Tom Lane
Backpatch-through: 14
CREATE STATISTICS: improve misleading error message
I think the error message for a different condition was inadvertently
copied.
This problem seems to have been introduced by commit a4d75c86bf15.
Author: Álvaro Herrera
Reported-by: jian he
Reviewed-by: Tom Lane
Backpatch-through: 14
CREATE STATISTICS: improve misleading error message
I think the error message for a different condition was inadvertently
copied.
This problem seems to have been introduced by commit a4d75c86bf15.
Author: Álvaro Herrera
Reported-by: jian he
Reviewed-by: Tom Lane
Backpatch-through: 14
Glossary: improve definition of "relation"
Define the more general term first, then the Postgres-specific meaning.
Wording from Tom Lane.
Discussion:
https://postgr.es/m/CACJufxEZ48toGH0Em_6vdsT57Y3L8pLF=DZCQ_gCii6=c3m...@mail.gmail.com
Branch
--
master
Details
---
https://git.postgre
ar in pg_database.h rather than dbcommands.h).
Clean this up.
Also, xlogreader.h and stringinfo.h are no longer needed by dbcommands.h
since commit f1fd515b393a, so remove them.
Author: Álvaro Herrera
Reviewed-by: Bertrand Drouvot
Reviewed-by: Michael Paquier
Discussion: https://postgr
AFAIR the current arrangement is purposefully what is is. I did
discover that my build script does "make install ; make -C contrib
install", which means src/test/modules is not built. But that's a local
fix for me.
--
Álvaro HerreraBreisgau, Deutschland — https://www.Ente
n stop including dbcommands.h. This seems a nice cleanup to me,
and passes headerscheck.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
>From 125ad88f2fd930508a883acbd06b330378756c87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Herrera?=
Date: Tu
_bt_delitems_delete_check()'s declaration
can use it.
Author: Álvaro Herrera
Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/202508051109.lzk3lcuzsaxo@alvherre.pgsql
Branch
--
master
Details
---
https://git.postgresql.org/pg/commi
Put PG_TEST_EXTRA doc items back in alphabetical order
A few items appears to have added in random order over the years.
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/455a040d966897edd3901f044945398450da338a
Modified Files
--
doc/src/sgml/regress.sgml
Put PG_TEST_EXTRA doc items back in alphabetical order
A few items appears to have added in random order over the years.
Branch
--
REL_18_STABLE
Details
---
https://git.postgresql.org/pg/commitdiff/f71ad5b082f3c714af6f3c43b0df1fe8e68f91e6
Modified Files
--
doc/src/sgml/regre
Hide expensive pg_upgrade test behind PG_TEST_EXTRA
This new test is very expensive. Make it opt-in.
Discussion: https://postgr.es/m/202508051433.ebznuqrxt4b2@alvherre.pgsql
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/37fc1803cc12120f19184cd952865cc35e0f1755
Hide expensive pg_upgrade test behind PG_TEST_EXTRA
This new test is very expensive. Make it opt-in.
Discussion: https://postgr.es/m/202508051433.ebznuqrxt4b2@alvherre.pgsql
Branch
--
REL_18_STABLE
Details
---
https://git.postgresql.org/pg/commitdiff/d185161e4739282de72083374e32451b10c
Rename XLogData protocol message to WALData
This name is only used as documentation, and using this name is
consistent with its byte being a 'w'. Renaming it would also make the
use of a symbolic name based on the word "WAL" rather than the obsolete
"XLog" term more consistent, per future commits
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
doc: mention unusability of dropped CHECK to verify NOT NULL
It's possible to use a CHECK (col IS NOT NULL) constraint to skip
scanning a table for nulls when adding a NOT NULL constraint on the same
column. However, if the CHECK constraint is dropped on the same command
that the NOT NULL is adde
Refactor grammar to create opt_utility_option_list
This changes the grammar for REINDEX, CHECKPOINT, CLUSTER, ANALYZE/ANALYSE;
they still accept the same options as before, but the grammar is written
differently for convenience of future development.
Reviewed-by: Nathan Bossart
Discussion: https
Move enum RecoveryTargetAction to xlogrecovery.h
Commit 70e81861fadd split out xlogrecovery.c/h and moved some enums
related to recovery targets to xlogrecovery.h. However, it seems that
the enum RecoveryTargetAction was inadvertently left out by that commit.
This commit moves it to xlogrecovery.h
e's actually a bunch of additional work to do if we want to do that.
IMO the proper fix for this, at least for now, is to remove it:
https://www.postgresql.org/message-id/202507221147.sdg2rmhbqb5z%40alvherre.pgsql
--
Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/
for them, this one also forgot. Add that now.
We also need to teach repairDependencyLoop() about the new type of
constraints being possible for domains.
Backpatch-through: 17
Co-authored-by: jian he
Co-authored-by: Álvaro Herrera
Reported-by: jian he
Discussion:
https://postgr.es/m/CACJufxF
for them, this one also forgot. Add that now.
We also need to teach repairDependencyLoop() about the new type of
constraints being possible for domains.
Backpatch-through: 17
Co-authored-by: jian he
Co-authored-by: Álvaro Herrera
Reported-by: jian he
Discussion:
https://postgr.es/m/CACJufxF
for them, this one also forgot. Add that now.
We also need to teach repairDependencyLoop() about the new type of
constraints being possible for domains.
Backpatch-through: 17
Co-authored-by: jian he
Co-authored-by: Álvaro Herrera
Reported-by: jian he
Discussion:
https://postgr.es/m/CACJufxF
Hello,
On 2025-Jul-17, Aleksander Alekseev wrote:
> > Reported-by: Aleksander Alekseev
>
> I didn't report this issue, it was done by Alexander Lakhin.
Uh, you're right, my mistake -- apologies.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.E
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Remove assertion from PortalRunMulti
We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail. Per discussion, rather than
contort things to get a tag assigned, just remove
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix dumping of comments on invalid constraints on domains
We skip dumping constraints together with domains if they are invalid
('separate') so that they appear after data -- but their comments were
dumped together with the domain definition, which in effect leads to the
comment being dumped when
Fix a couple more places in docs for pg_lsn change
Also, revert Unicode linestyle to ASCII.
Reported-by: Japin Li
Discussion:
https://postgr.es/m/me0p300mb04453a39931f95805c4205a8b6...@me0p300mb0445.ausp300.prod.outlook.com
Branch
--
master
Details
---
https://git.postgresql.org/pg/co
Adapt pg_upgrade test to pg_lsn output format difference
Commit 2633dae2e487 added some zero padding to various LSNs output
routines so that the low word is always 8 hex digits long, for easy
human consumption. This included the pg_lsn datatype, which breaks the
pg_upgrade test when it compares t
page to disk
- XLogSimpleInsertInt64: Does a XLogBeginInsert followed by XLogInsert
of a trivial record whose data is just an int64.
Author: Evgeny Voropaev
Reviewed by: Álvaro Herrera
Reviewed by: Andrey Borodin
Reviewed by: Aleksander Alekseev
Discussion:
https://www.postgresql.org/message
confusion when comparing.
To address this, the LSN format is now uniformly set to `%X/%08X`,
ensuring the lower 32-bit part is always zero-padded to eight
hexadecimal digits.
Author: Japin Li
Reviewed-by: Masahiko Sawada
Reviewed-by: Álvaro Herrera
Discussion:
https://postgr.es/m
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
REL_17_STABLE
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
REL_15_STABLE
pg_upgrade: Add missing newline in error message
Minor oversight in 347758b12063
Branch
--
REL_18_STABLE
Details
---
https://git.postgresql.org/pg/commitdiff/5aba3e637d3d874f7bf00318c828249a964c4c3c
Modified Files
--
src/bin/pg_upgrade/check.c | 2 +-
1 file changed, 1 insert
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
master
Detai
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
REL_13_STABLE
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
REL_14_STABLE
pg_upgrade: Add missing newline in error message
Minor oversight in 347758b12063
Branch
--
REL_17_STABLE
Details
---
https://git.postgresql.org/pg/commitdiff/0807a4656edcfdc2f900bc070a4a8592a0a7f880
Modified Files
--
src/bin/pg_upgrade/check.c | 2 +-
1 file changed, 1 insert
pg_upgrade: Add missing newline in error message
Minor oversight in 347758b12063
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/90a85fce5e9b9ea63ec7e1b3001e0f39d4c8b7d4
Modified Files
--
src/bin/pg_upgrade/check.c | 2 +-
1 file changed, 1 insertion(+),
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
REL_16_STABLE
Fix new pg_upgrade query not to rely on regnamespace
That was invented in 9.5, and pg_upgrade claims to support back to 9.0.
But we don't need that with a simple query change, tested by Tom Lane.
Discussion: https://postgr.es/m/202507041645.afjl5rssvrgu@alvherre.pgsql
Branch
--
REL_18_STABLE
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
CREATE TABLE ip (id int PRIMARY KEY);
CREATE TABLE ic (id int) INHERITS (ip);
ALTER TABLE ic ALTER id DROP NOT NULL;
pg_upgrade fails during the schema restore phase due to this error:
r now.
Author: Álvaro Herrera
Reported-by: Fujii Masao
Reviewed-by: Fujii Masao
Reviewed-by: Dagfinn Ilmari Mannsåker
Discussion:
https://postgr.es/m/d4f14c6b-086b-463c-b15f-01c7c9728...@oss.nttdata.com
Discussion: https://postgr.es/m/202505111448.bwbfomrymq4b@alvherre.pgsql
Branch
--
m
On 2025-Jul-03, Daniel Gustafsson wrote:
> > On 3 Jul 2025, at 11:30, Álvaro Herrera wrote:
>
> alabio seems unhappy, and the hunk below seems to be culprit, it should closed
> with a right?
Thanks for pointing this out. Yeah, not only I used the wrong tag, but
it's also
Fix broken XML
I messed this up in commit 87251e114967.
Per buildfarm member alabio, via Daniel Gustafsson.
Discussion: https://postgr.es/m/b94d82d1-7af4-4412-ac02-82eaa6154...@yesql.se
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/81a2625eb2e4608ba6ca41b2bf548d
Prevent creation of duplicate not-null constraints for domains
This was previously harmless, but now that we create pg_constraint rows
for those, duplicates are not welcome anymore.
Backpatch to 18.
Co-authored-by: jian he
Co-authored-by: Álvaro Herrera
Discussion:
https://postgr.es/m
Prevent creation of duplicate not-null constraints for domains
This was previously harmless, but now that we create pg_constraint rows
for those, duplicates are not welcome anymore.
Backpatch to 18.
Co-authored-by: jian he
Co-authored-by: Álvaro Herrera
Discussion:
https://postgr.es/m
he
Reviewed-by: Fujii Masao
Reviewed-by: Álvaro Herrera
Discussion:
https://postgr.es/m/caaj_b97hd-jmts7ajgu6tdbczdx_kyukxg+k-dtymoieg+g...@mail.gmail.com
Discussion:
https://postgr.es/m/CACJufxHSp2puxP=q8ztugl1f+heapnzqfbzy5zngujugwjb...@mail.gmail.com
Branch
--
master
Detail
error message as
well.
Co-authored-by: jian he
Co-authored-by: Fujii Masao
Co-authored-by: Álvaro Herrera
Co-authored-by: Amul Sul
Discussion:
https://postgr.es/m/CACJufxHSp2puxP=q8ztugl1f+heapnzqfbzy5zngujugwjb...@mail.gmail.com
Branch
--
REL_18_STABLE
Details
---
https
error message as
well.
Co-authored-by: jian he
Co-authored-by: Fujii Masao
Co-authored-by: Álvaro Herrera
Co-authored-by: Amul Sul
Discussion:
https://postgr.es/m/CACJufxHSp2puxP=q8ztugl1f+heapnzqfbzy5zngujugwjb...@mail.gmail.com
Branch
--
master
Details
---
https
Fix typo in comment
Introduced by c2da1a5d6325
Reported-by: Michael Paquier
Discussion: https://postgr.es/m/aft4qerwrv-3q...@paquier.xyz
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/a3994ec6acb27545300ce1e336e4d119d8000ba9
Modified Files
--
contrib
s for the comments.
Co-Authored-By: Jian He
Co-Authored-By: Álvaro Herrera
Reported-By: Fujii Masao
Reviewed-By: Fujii Masao
Discussion:
https://postgr.es/m/d50ff977-c728-4e9e-8488-fc2688e08...@oss.nttdata.com
Branch
--
master
Details
---
https://git.postgresql.org/pg/commi
docs: fix typo
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/48c80aba7538d7c515d0c89f4d11f88974fee851
Modified Files
--
doc/src/sgml/ref/pg_dump.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Improve jumble squashing through CoerceViaIO and RelabelType
There's no principled reason for query jumbling to only remove the first
layer of RelabelType and CoerceViaIO. Change it to see through as many
layers as there are.
Branch
--
master
Details
---
https://git.postgresql.org/pg/co
Make query jumbling also squash PARAM_EXTERN params
Commit 62d712ecfd94 made query jumbling squash lists of Consts as a
single element, but there's no reason not to treat PARAM_EXTERN
parameters the same. For these purposes, these values are indeed
constants for any particular execution of a quer
Fix squashing algorithm for query texts
The algorithm to squash lists of constants added by commit 62d712ecfd94
was a bit too simplistic; we wanted to avoid adding unnecessary
complexity, but cases like direct function calls of typecasting
functions (and others) were missed, and bogus SQL syntax w
Avoid bogus scans of partitions when marking FKs enforced
Similar to commit cc733ed164c5: when an unenforced foreign key that
references a partitioned table is altered to be enforced, we scan
the constrained table based on each partition on the referenced
partitioned table. This is bogus and like
Avoid bogus scans of partitions when validating FKs to partitioned tables
Validating an unvalidated foreign key that references a partitioned
table would try to queue validations for each individual partition of
the referenced table, but this is wrong: each individual partition would
not necessari
Fix broken-FK-detection query in release notes
Commits 53af9491a043 and 2d5fe514052a fixed a number of problems with
foreign keys that reference partitioned tables, and a query to detect
already broken FKs was supplied with the release notes for 17.1, 16.5,
15.9, 14.14, 13.17. However, that query
Fix broken-FK-detection query in release notes
Commits 53af9491a043 and 2d5fe514052a fixed a number of problems with
foreign keys that reference partitioned tables, and a query to detect
already broken FKs was supplied with the release notes for 17.1, 16.5,
15.9, 14.14, 13.17. However, that query
Fix broken-FK-detection query in release notes
Commits 53af9491a043 and 2d5fe514052a fixed a number of problems with
foreign keys that reference partitioned tables, and a query to detect
already broken FKs was supplied with the release notes for 17.1, 16.5,
15.9, 14.14, 13.17. However, that query
Fix broken-FK-detection query in release notes
Commits 53af9491a043 and 2d5fe514052a fixed a number of problems with
foreign keys that reference partitioned tables, and a query to detect
already broken FKs was supplied with the release notes for 17.1, 16.5,
15.9, 14.14, 13.17. However, that query
Fix broken-FK-detection query in release notes
Commits 53af9491a043 and 2d5fe514052a fixed a number of problems with
foreign keys that reference partitioned tables, and a query to detect
already broken FKs was supplied with the release notes for 17.1, 16.5,
15.9, 14.14, 13.17. However, that query
Add tab-complete for ALTER DOMAIN ADD [CONSTRAINT]
We can add tab-completion with "CHECK (" and "NOT NULL" after ALTER
DOMAIN ADD [CONSTRAINT].
ALTER DOMAIN dom ADD -> CHECK (
ALTER DOMAIN dom ADD -> NOT NULL
ALTER DOMAIN dom ADD -> CONSTRAINT
ALTER DOMAIN dom ADD CONSTRAINT nm -> CHECK (
ALTER
Fix comment of tsquerysend()
The comment describes the order in which fields are sent, and it had one
of the fields in the wrong place.
This has been wrong since e6dbcb72fafa (2008), so backpatch all the way
back.
Author: Emre Hasegeli
Discussion:
https://postgr.es/m/CAE2gYzzf38bR_R=izhpmxamqh
Fix comment of tsquerysend()
The comment describes the order in which fields are sent, and it had one
of the fields in the wrong place.
This has been wrong since e6dbcb72fafa (2008), so backpatch all the way
back.
Author: Emre Hasegeli
Discussion:
https://postgr.es/m/CAE2gYzzf38bR_R=izhpmxamqh
Fix comment of tsquerysend()
The comment describes the order in which fields are sent, and it had one
of the fields in the wrong place.
This has been wrong since e6dbcb72fafa (2008), so backpatch all the way
back.
Author: Emre Hasegeli
Discussion:
https://postgr.es/m/CAE2gYzzf38bR_R=izhpmxamqh
Fix comment of tsquerysend()
The comment describes the order in which fields are sent, and it had one
of the fields in the wrong place.
This has been wrong since e6dbcb72fafa (2008), so backpatch all the way
back.
Author: Emre Hasegeli
Discussion:
https://postgr.es/m/CAE2gYzzf38bR_R=izhpmxamqh
Fix comment of tsquerysend()
The comment describes the order in which fields are sent, and it had one
of the fields in the wrong place.
This has been wrong since e6dbcb72fafa (2008), so backpatch all the way
back.
Author: Emre Hasegeli
Discussion:
https://postgr.es/m/CAE2gYzzf38bR_R=izhpmxamqh
Fix comment of tsquerysend()
The comment describes the order in which fields are sent, and it had one
of the fields in the wrong place.
This has been wrong since e6dbcb72fafa (2008), so backpatch all the way
back.
Author: Emre Hasegeli
Discussion:
https://postgr.es/m/CAE2gYzzf38bR_R=izhpmxamqh
relcache: Avoid memory leak on tables with no CHECK constraints
As complained about by Valgrind, in commit a379061a22a8 I failed to
realize that I was causing rd_att->constr->check to become allocated
when no CHECK constraints exist; previously it'd remain NULL. (This was
my bug, not the mentione
Sort includes in alphabetical order
Added by commit 042a66291b04, no backpatch needed.
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/7b2ad4342603c9796bf28dbe84aca247b2bfa9f8
Modified Files
--
src/backend/utils/adt/mcxtfuncs.c | 4 ++--
1 file changed,
Handle self-referencing FKs correctly in partitioned tables
For self-referencing foreign keys in partitioned tables, we weren't
handling creation of pg_constraint rows during CREATE TABLE PARTITION AS
as well as ALTER TABLE ATTACH PARTITION. This is an old bug -- mostly,
we broke this in 614a406b
1 - 100 of 228 matches
Mail list logo