Re: pgsql: TupleHashTable: store additional data along with tuple.

2025-01-11 Thread Alvaro Herrera
On 2025-Jan-11, Junwang Zhao wrote: > Seems this introduced an indent issue? It should be a whitespace > rather than a tab after the semicolon. Yeah, there's an issue in execGrouping.c as well. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ Subversion to GIT: t

pgsql: Don't disallow DROP of constraints ONLY on partitioned tables

2024-09-30 Thread Alvaro Herrera
Don't disallow DROP of constraints ONLY on partitioned tables This restriction seems to have come about due to some fuzzy thinking: in commit 9139aa19423b we were adding a restriction against ADD constraint ONLY on partitioned tables (which is sensible) and apparently we thought the DROP case had

pgsql: Turn 'if' condition around to avoid Svace complaint

2024-09-25 Thread Alvaro Herrera
Turn 'if' condition around to avoid Svace complaint The unwritten assumption of this code is that both events->head and events->tail are NULL together (an empty list) or they aren't. So the code was testing events->head for nullness and using that as a cue to deference events->tail, which annoys

pgsql: Add commit 7229ebe011df to .git-blame-ignore-revs.

2024-09-14 Thread Alvaro Herrera
Add commit 7229ebe011df to .git-blame-ignore-revs. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/fca91b5c903a0d810492eed5a207032f7ee6e175 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Add commit 7229ebe011df to .git-blame-ignore-revs.

2024-09-14 Thread Alvaro Herrera
Add commit 7229ebe011df to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f64074c88c067b4733ae439afae46ad61e45474b Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Minor wording change in table "JSON Creation Functions"

2024-08-20 Thread Alvaro Herrera
Minor wording change in table "JSON Creation Functions" For readability. Backpatch to 16. Author: Erik Wienhold Discussion: https://postgr.es/m/8ddac732-d650-4958-b9c9-ea8e61162...@ewie.name Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5effd5970429cdac5

pgsql: Minor wording change in table "JSON Creation Functions"

2024-08-20 Thread Alvaro Herrera
Minor wording change in table "JSON Creation Functions" For readability. Backpatch to 16. Author: Erik Wienhold Discussion: https://postgr.es/m/8ddac732-d650-4958-b9c9-ea8e61162...@ewie.name Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/25642b2a8b4215722

pgsql: Minor wording change in table "JSON Creation Functions"

2024-08-20 Thread Alvaro Herrera
Minor wording change in table "JSON Creation Functions" For readability. Backpatch to 16. Author: Erik Wienhold Discussion: https://postgr.es/m/8ddac732-d650-4958-b9c9-ea8e61162...@ewie.name Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/678a8358d18d4079ced9f365

pgsql: Add injection-point test for new multixact CV usage

2024-08-20 Thread Alvaro Herrera
Add injection-point test for new multixact CV usage Before commit a0e0fb1ba56f, multixact.c contained a case in the multixact-read path where it would loop sleeping 1ms each time until another multixact-create path completed, which was uncovered by any tests. That commit changed the code to rely

pgsql: Avoid failure to open dropped detached partition

2024-08-19 Thread Alvaro Herrera
Avoid failure to open dropped detached partition When a partition is detached and immediately dropped, a prepared statement could try to compute a new partition descriptor that includes it. This leads to this kind of error: ERROR: could not open relation with OID 457639 Avoid this by skipping t

pgsql: Avoid failure to open dropped detached partition

2024-08-19 Thread Alvaro Herrera
Avoid failure to open dropped detached partition When a partition is detached and immediately dropped, a prepared statement could try to compute a new partition descriptor that includes it. This leads to this kind of error: ERROR: could not open relation with OID 457639 Avoid this by skipping t

pgsql: Avoid failure to open dropped detached partition

2024-08-19 Thread Alvaro Herrera
Avoid failure to open dropped detached partition When a partition is detached and immediately dropped, a prepared statement could try to compute a new partition descriptor that includes it. This leads to this kind of error: ERROR: could not open relation with OID 457639 Avoid this by skipping t

pgsql: Avoid failure to open dropped detached partition

2024-08-19 Thread Alvaro Herrera
Avoid failure to open dropped detached partition When a partition is detached and immediately dropped, a prepared statement could try to compute a new partition descriptor that includes it. This leads to this kind of error: ERROR: could not open relation with OID 457639 Avoid this by skipping t

pgsql: Avoid failure to open dropped detached partition

2024-08-19 Thread Alvaro Herrera
Avoid failure to open dropped detached partition When a partition is detached and immediately dropped, a prepared statement could try to compute a new partition descriptor that includes it. This leads to this kind of error: ERROR: could not open relation with OID 457639 Avoid this by skipping t

pgsql: Search for SLRU page only in its own bank

2024-08-18 Thread Alvaro Herrera
Search for SLRU page only in its own bank One of the two slot scans in SlruSelectLRUPage was not walking only the slots in the specific bank where the buffer could be; change it to do that. Oversight in 53c2a97a9266. Author: Sergey Sargsyan Discussion: https://postgr.es/m/18582-5f301dd30ba91...

pgsql: Search for SLRU page only in its own bank

2024-08-18 Thread Alvaro Herrera
Search for SLRU page only in its own bank One of the two slot scans in SlruSelectLRUPage was not walking only the slots in the specific bank where the buffer could be; change it to do that. Oversight in 53c2a97a9266. Author: Sergey Sargsyan Discussion: https://postgr.es/m/18582-5f301dd30ba91...

pgsql: libpq: Trace all messages received from the server

2024-08-16 Thread Alvaro Herrera
libpq: Trace all messages received from the server Not all messages that libpq received from the server would be sent through our message tracing logic. This commit tries to fix that by introducing a new function pqParseDone which make it harder to forget about doing so. The messages that we now

pgsql: libpq: Trace responses to SSLRequest and GSSENCRequest

2024-08-14 Thread Alvaro Herrera
libpq: Trace responses to SSLRequest and GSSENCRequest Since these are single bytes instead of v2 or v3 messages they need custom tracing logic. These "messages" don't even have official names in the protocol specification, so I (Jelte) called them SSLResponse and GSSENCResponse here. Author: Je

pgsql: libpq: Trace frontend authentication challenges

2024-08-12 Thread Alvaro Herrera
libpq: Trace frontend authentication challenges If tracing was enabled during connection startup, these messages would previously be listed in the trace output as something like this: F 54 Unknown message: 70 mismatched message length: consumed 4, expected 54 With this commit their ty

pgsql: Fix nls.mk to reflect astreamer files relocation

2024-08-12 Thread Alvaro Herrera
Fix nls.mk to reflect astreamer files relocation In the recent commit f80b09bac8, astreamer files were moved to another directory, but this change was not reflected in nls.mk. This commit corrects that oversight. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240806.102123.6481784

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: Fix creation of partition descriptor during concurrent detach+dr

2024-08-12 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach+drop If a partition undergoes DETACH CONCURRENTLY immediately followed by DROP, this could cause a problem for a concurrent transaction recomputing the partition descriptor when running a prepared statement, because it tries to derefere

pgsql: libpq: Trace StartupMessage/SSLRequest/GSSENCRequest correctly

2024-08-09 Thread Alvaro Herrera
libpq: Trace StartupMessage/SSLRequest/GSSENCRequest correctly libpq tracing via PQtrace would uselessly print the wrong thing for these types of messages. With this commit, their type and contents would be correctly listed. (This can be verified with PQconnectStart(), but we don't use that in l

pgsql: libpq: Add suppress argument to pqTraceOutputNchar

2024-08-08 Thread Alvaro Herrera
libpq: Add suppress argument to pqTraceOutputNchar In future commits we're going to trace authentication related messages. Some of these messages contain challenge bytes as part of a challenge-response flow. Since these bytes are different for every connection, we want to normalize them when the

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refuse ATTACH of a table referenced by a foreign key

2024-08-08 Thread Alvaro Herrera
Refuse ATTACH of a table referenced by a foreign key Trying to attach a table as a partition which is already on the referenced side of a foreign key on the partitioned table that it is being attached to, leads to strange behavior: we try to clone the foreign key from the parent to the partition,

pgsql: Refactor error messages to reduce duplication

2024-08-08 Thread Alvaro Herrera
Refactor error messages to reduce duplication I also took the liberty of changing errmsg("COPY DEFAULT only available using COPY FROM") to errmsg("COPY %s cannot be used with %s", "DEFAULT", "COPY TO") because the original wording is unlike all other messages that indicate option

pgsql: Refactor error messages to reduce duplication

2024-08-08 Thread Alvaro Herrera
Refactor error messages to reduce duplication I also took the liberty of changing errmsg("COPY DEFAULT only available using COPY FROM") to errmsg("COPY %s cannot be used with %s", "DEFAULT", "COPY TO") because the original wording is unlike all other messages that indicate option

pgsql: Refactor/reword some error messages to avoid duplicates

2024-08-07 Thread Alvaro Herrera
Refactor/reword some error messages to avoid duplicates Also, remove brackets around "EMPTY [ ARRAY ]". An error message is not the place to state that a keyword is optional. Backpatch to 17. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/899f39ea25f2ee63a

pgsql: Refactor/reword some error messages to avoid duplicates

2024-08-07 Thread Alvaro Herrera
Refactor/reword some error messages to avoid duplicates Also, remove brackets around "EMPTY [ ARRAY ]". An error message is not the place to state that a keyword is optional. Backpatch to 17. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2bb969f3998489e5dc4fe9f2

pgsql: Fix NLS file reference in pg_createsubscriber

2024-08-02 Thread Alvaro Herrera
Fix NLS file reference in pg_createsubscriber pg_createsubscriber is referring to a non-existent message translation file, causing NLS to not work correctly. This command should use the same file as pg_basebackup. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240802.115717.1083441

pgsql: Fix NLS file reference in pg_createsubscriber

2024-08-02 Thread Alvaro Herrera
Fix NLS file reference in pg_createsubscriber pg_createsubscriber is referring to a non-existent message translation file, causing NLS to not work correctly. This command should use the same file as pg_basebackup. Author: Kyotaro Horiguchi Discussion: https://postgr.es/m/20240802.115717.1083441

pgsql: pg_createsubscriber: Fix bogus error message

2024-08-02 Thread Alvaro Herrera
pg_createsubscriber: Fix bogus error message Also some desultory style improvement Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3b2f668b785c9b7970d86e7f72a717751d1ddfc2 Modified Files -- src/bin/pg_basebackup/pg_createsubscriber.c | 6 +++--- 1 file c

pgsql: pg_createsubscriber: Fix bogus error message

2024-08-02 Thread Alvaro Herrera
pg_createsubscriber: Fix bogus error message Also some desultory style improvement Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8c6ba6e6a834030c80d7e0d2fa28101e9e17a993 Modified Files -- src/bin/pg_basebackup/pg_createsubscriber.c | 6 +++--- 1

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- REL_17_STABLE Details --- htt

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- REL_13_STABLE Details --- htt

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- REL_15_STABLE Details --- htt

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- REL_12_STABLE Details --- htt

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- master Details --- https://gi

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- REL_16_STABLE Details --- htt

pgsql: Fix a missing article in the documentation

2024-07-24 Thread Alvaro Herrera
Fix a missing article in the documentation Per complaint from Grant Gryczan. It's a very old typo; backpatch all the way back. Author: Laurenz Albe Discussion: https://postgr.es/m/172179789219.915368.16590585529628354...@wrigleys.postgresql.org Branch -- REL_14_STABLE Details --- htt

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: Reset relhassubclass upon attaching table as a partition

2024-07-24 Thread Alvaro Herrera
Reset relhassubclass upon attaching table as a partition We don't allow inheritance parents as partitions, and have checks to prevent this; but if a table _was_ in the past an inheritance parents and all their children are removed, the pg_class.relhassubclass flag may remain set, which confuses th

pgsql: postgres_fdw: Split out the query_cancel test to its own file

2024-07-22 Thread Alvaro Herrera
postgres_fdw: Split out the query_cancel test to its own file This allows us to skip it in Cygwin, where it's reportedly flaky because of platform bugs or something. Backpatch to 17, where the test was introduced by commit 2466d6654f85. Reported-by: Alexander Lakhin Discussion: https://postgr.e

pgsql: postgres_fdw: Split out the query_cancel test to its own file

2024-07-22 Thread Alvaro Herrera
postgres_fdw: Split out the query_cancel test to its own file This allows us to skip it in Cygwin, where it's reportedly flaky because of platform bugs or something. Backpatch to 17, where the test was introduced by commit 2466d6654f85. Reported-by: Alexander Lakhin Discussion: https://postgr.e

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2f500745978f5da017933b880f606d15d351d5f7 Modified Files -- src/test/regress/input/constraints.source | 3 ++- src/test/regress/output/constraints.source

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/34eb37f7921b0f0dd720570957858b9650dfc1ab Modified Files -- src/test/regress/expected/constraints.out | 3 ++- src/test/regress/sql/constraints.sql |

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/74e12db19cbc78258a92da8be637a3fb0106b126 Modified Files -- src/test/regress/expected/constraints.out | 3 ++- src/test/regress/sql/constraints.sql | 3 ++-

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7898a494fde999fcf13d9c1fd7db4187c7242163 Modified Files -- src/test/regress/input/constraints.source | 3 ++- src/test/regress/output/constraints.source

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9f0f72d89ff6cff8261fd793257147cbb268a6ae Modified Files -- src/test/regress/expected/constraints.out | 3 ++- src/test/regress/sql/constraints.sql |

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/067cb6c5da6cfe60618c2951b061137233680c20 Modified Files -- src/test/regress/input/constraints.source | 3 ++- src/test/regress/output/constraints.source

pgsql: Add ORDER BY to new test query

2024-07-12 Thread Alvaro Herrera
Add ORDER BY to new test query Per buildfarm. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0340eefd9ba4a6bbaaac07a78c058181fc11 Modified Files -- src/test/regress/expected/constraints.out | 3 ++- src/test/regress/sql/constraints.sql |

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix ALTER TABLE DETACH for inconsistent indexes

2024-07-12 Thread Alvaro Herrera
Fix ALTER TABLE DETACH for inconsistent indexes When a partitioned table has an index that doesn't support a constraint, but a partition has an equivalent index that does, then a DETACH operation would misbehave: a crash in assertion-enabled systems (because we fail to find the constraint in the p

pgsql: Fix copy/paste mistake in comment

2024-07-04 Thread Alvaro Herrera
Fix copy/paste mistake in comment Backpatch to 17 Author: Yugo NAGATA Discussion: https://postgr.es/m/20240704134638.355ad44a445fa1e764a22...@sranhm.sraoss.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2ef575c7803a55101352c0f6cb8f745af063a66c Modified Fi

pgsql: Fix copy/paste mistake in comment

2024-07-04 Thread Alvaro Herrera
Fix copy/paste mistake in comment Backpatch to 17 Author: Yugo NAGATA Discussion: https://postgr.es/m/20240704134638.355ad44a445fa1e764a22...@sranhm.sraoss.co.jp Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e72f841cbec12b60dbfcde6e4aaeec8ecab987c4 Modi

pgsql: Remove bogus assertion in pg_atomic_monotonic_advance_u64

2024-07-04 Thread Alvaro Herrera
Remove bogus assertion in pg_atomic_monotonic_advance_u64 This code wanted to ensure that the 'exchange' variable passed to pg_atomic_compare_exchange_u64 has correct alignment, but apparently platforms don't actually require anything that doesn't come naturally. While messing with pg_atomic_mono

pgsql: Remove bogus assertion in pg_atomic_monotonic_advance_u64

2024-07-04 Thread Alvaro Herrera
Remove bogus assertion in pg_atomic_monotonic_advance_u64 This code wanted to ensure that the 'exchange' variable passed to pg_atomic_compare_exchange_u64 has correct alignment, but apparently platforms don't actually require anything that doesn't come naturally. While messing with pg_atomic_mono

pgsql: Fix copy-paste mistake in PQcancelCreate

2024-07-01 Thread Alvaro Herrera
Fix copy-paste mistake in PQcancelCreate When an OOM occurred, this function was incorrectly setting a status of CONNECTION_BAD on the passed in PGconn instead of on the newly created PGcancelConn. Mistake introduced with 61461a300c1c. Backpatch to 17. Author: Jelte Fennema-Nio Reported-by: No

pgsql: Fix copy-paste mistake in PQcancelCreate

2024-07-01 Thread Alvaro Herrera
Fix copy-paste mistake in PQcancelCreate When an OOM occurred, this function was incorrectly setting a status of CONNECTION_BAD on the passed in PGconn instead of on the newly created PGcancelConn. Mistake introduced with 61461a300c1c. Backpatch to 17. Author: Jelte Fennema-Nio Reported-by: No

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5fcd0d0ce1e5f2abe6b3e9d6f05e439d3088a538 Modified Files -

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a2dff271ebe2a0547d46e90dcb02c088cf2f031c Modified Files

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/79228c0459817cfbf830395c77735d8f3bce3f47 Modified Files -

pgsql: Fix thinkos in comments

2024-06-27 Thread Alvaro Herrera
Fix thinkos in comments The first one was noticed by Tender Wang and introduced with 8aba9322511f; the other one was newly introduced with dbca3469ebf8. Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/468ffee47bcb9c8b7b4f7b3168aef804a3ad802c Modified Files -

pgsql: Fix partition pruning setup during DETACH CONCURRENTLY

2024-06-26 Thread Alvaro Herrera
Fix partition pruning setup during DETACH CONCURRENTLY When detaching partition in concurrent mode, it's possible for partition descriptors to not match the set that was recently seen when the plan was made, causing an assertion failure or (in production builds) failure to construct a working plan

pgsql: Revert "Fix partition pruning setup during DETACH CONCURRENTLY"

2024-06-24 Thread Alvaro Herrera
Revert "Fix partition pruning setup during DETACH CONCURRENTLY" This reverts commit 27162a64b386; this branch is in code freeze due to a nearing release. We can commit again after the release is out. Discussion: https://postgr.es/m/1158256.1719239...@sss.pgh.pa.us Branch -- master Details

pgsql: Fix partition pruning setup during DETACH CONCURRENTLY

2024-06-24 Thread Alvaro Herrera
Fix partition pruning setup during DETACH CONCURRENTLY When detaching partition in concurrent mode, it's possible for partition descriptors to not match the set that was recently seen when the plan was made, causing an assertion failure or (in production builds) failure to construct a working plan

pgsql: Fix partition pruning setup during DETACH CONCURRENTLY

2024-06-24 Thread Alvaro Herrera
Fix partition pruning setup during DETACH CONCURRENTLY When detaching partition in concurrent mode, it's possible for partition descriptors to not match the set that was recently seen when the plan was made, causing an assertion failure or (in production builds) failure to construct a working plan

pgsql: Fix partition pruning setup during DETACH CONCURRENTLY

2024-06-24 Thread Alvaro Herrera
Fix partition pruning setup during DETACH CONCURRENTLY When detaching partition in concurrent mode, it's possible for partition descriptors to not match the set that was recently seen when the plan was made, causing an assertion failure or (in production builds) failure to construct a working plan

pgsql: Fix partition pruning setup during DETACH CONCURRENTLY

2024-06-24 Thread Alvaro Herrera
Fix partition pruning setup during DETACH CONCURRENTLY When detaching partition in concurrent mode, it's possible for partition descriptors to not match the set that was recently seen when the plan was made, causing an assertion failure or (in production builds) failure to construct a working plan

pgsql: Fix creation of partition descriptor during concurrent detach

2024-06-11 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach When a partition is being detached in concurrent mode, it is possible for find_inheritance_children_extended() to return that partition in the list, and immediately after that receive an invalidation message that sets its relpartbound t

pgsql: Fix creation of partition descriptor during concurrent detach

2024-06-11 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach When a partition is being detached in concurrent mode, it is possible for find_inheritance_children_extended() to return that partition in the list, and immediately after that receive an invalidation message that sets its relpartbound t

pgsql: Fix creation of partition descriptor during concurrent detach

2024-06-11 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach When a partition is being detached in concurrent mode, it is possible for find_inheritance_children_extended() to return that partition in the list, and immediately after that receive an invalidation message that sets its relpartbound t

pgsql: Fix creation of partition descriptor during concurrent detach

2024-06-11 Thread Alvaro Herrera
Fix creation of partition descriptor during concurrent detach When a partition is being detached in concurrent mode, it is possible for find_inheritance_children_extended() to return that partition in the list, and immediately after that receive an invalidation message that sets its relpartbound t

pgsql: Fix typo

2024-05-13 Thread Alvaro Herrera
Fix typo Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/11c1984cccad1d41f461d3bb00f9e662332d002b Modified Files -- doc/src/sgml/catalogs.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Revert structural changes to not-null constraints

2024-05-13 Thread Alvaro Herrera
Revert structural changes to not-null constraints There are some problems with the new way to handle these constraints that were detected at the last minute, and require fixes that appear too invasive to be doing this late in the cycle. Revert this (again) for now, we'll try again with these prob

pgsql: Fix test case to do what it intends to

2024-05-13 Thread Alvaro Herrera
Fix test case to do what it intends to This test case intended to fail because setting a column as generated to the partitioned table while leaving the partition alone is not allowed; but instead failed because of a discrepancy of not-null constraint. Fix this by adding the not-null constraint fi

pgsql: Fix inconsistencies in error messages

2024-05-09 Thread Alvaro Herrera
Fix inconsistencies in error messages Reported by Kyotaro Horiguchi Also some comments mentioning wrong version numbers, spotted by Justin Pryzby. Discussion: https://postgr.es/m/20240507.171724.750916195320223609.horikyota@gmail.com Discussion: https://postgr.es/m/Zh0aAH7tbZb-9HbC@pryzbyj2

Re: pgsql: Revert "Skip .DS_Store files in server side utils"

2024-05-06 Thread Alvaro Herrera
On 2024-Feb-13, Daniel Gustafsson wrote: > Revert "Skip .DS_Store files in server side utils" > > This reverts commit aeee173d229232f94acc61e7bfe81d40f56e478e. > Per failure reports from the buildfarm. I think you jumped the gun on this one. As far as I can tell, the problem was this: t/020_pg

pgsql: Remove mention of nchar

2024-05-06 Thread Alvaro Herrera
Remove mention of nchar This datatype is purposefully not documented. Erik Wienhold Discussion: https://postgr.es/m/om3g7p7u3ztlrdp4tfswgulavljgn2fe6u2agk34mrr65dffuu@cpzlzuv6flko Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/81b2252e609cfa74550dd6804949485c094

  1   2   3   4   5   6   7   8   9   10   >