Commit Graph

58818 Commits

Author SHA1 Message Date
Bruce Momjian 4cf9aab214 doc PG 17 relnotes: improve btree "set/array" matching item
Reported-by: Peter Geoghegan

Discussion: https://postgr.es/m/CAH2-WznwSs5irUka2deUooSdH7Sts2oPdVv4PCOwhK51fq2ZTg@mail.gmail.com

Backpatch-through: master
2024-05-25 23:56:06 -04:00
Bruce Momjian f3bfa02991 doc PG 17 relnotes: fix "pg_stat_slru_reset" wording
Reported-by: Marcos Pegoraro

Discussion: https://postgr.es/m/CAB-JLwYXrL-8FBfVDX8tevyTJ8y1SMmot5A-5cLqXAAne7W0CQ@mail.gmail.com

Backpatch-through: master
2024-05-25 23:50:20 -04:00
Bruce Momjian 232278ca93 doc PG 17 relnote: adjust "SLRU cache sizes to be configured"
Add Álvaro Herrera as additional item author.

Reported-by: Álvaro Herrera

Discussion: https://postgr.es/m/202405231122.zew2gncy63fo@alvherre.pgsql

Author: Álvaro Herrera

Backpatch-through: master
2024-05-25 23:48:35 -04:00
Alexander Korotkov d53a4286d7 Provide deterministic order for catalog queries in partition_split.sql
System catalog tables are subject to modification by parallel tests.  This
is the source of instability when querying them without explicit ORDER BY.
This commit adds explicit ORDER BY to system catalog queries in
partition_split.sql to stabilize the result.

Reported-by: Tom Lane
Discussion: https://postgr.es/m/695264.1716578979%40sss.pgh.pa.us
2024-05-26 06:41:56 +03:00
Bruce Momjian 87331c6823 doc PG 17 relnotes: combine items
Reported-by: Andres Freund

Discussion: https://postgr.es/m/20240524182329.gmzcd3a2zrvyepgy@awork3.anarazel.de

Backpatch-through: master
2024-05-25 23:40:17 -04:00
Michael Paquier 53785d2a2a Fix comment in 024_add_drop_pub.pl
A comment of the test was referring to an incorrect table.

Thinko in 1046a69b30.

Extracted from a larger patch by the same author.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/70b340bc-244a-589d-ef8b-d8aebb707a84@gmail.com
2024-05-24 13:40:36 +09:00
Michael Paquier ac8c85d04b Improve stability of subscription/029_on_error.pl
This test was failing when using wal_debug=on and -DWAL_DEBUG because of
additional log entries that made the test grab an LSN not mapping with
the error expected in the test.

Previously the test would look for the first matching line to get the
LSN to skip up to.  This is improved by having the test scan the logs
with a regexp that checks for the expected ERROR string, ensuring that
the wanted LSN comes from the correct context.

Backpatch down to 15 where this test has been introduced.

Author: Ian Ilyasov
Discussion: https://postgr.es/m/GV1P251MB100415F17E6B2FDD7188777ECDE32@GV1P251MB1004.EURP251.PROD.OUTLOOK.COM
Backpatch-through: 15
2024-05-24 11:21:21 +09:00
Tom Lane 0162a9bde2 Remove race conditions between ECPGdebug() and ecpg_log().
Coverity complains that ECPGdebug is accessing debugstream without
holding debug_mutex, which is a fair complaint: we should take
debug_mutex while changing the settings ecpg_log looks at.

In some branches it also complains about unlocked use of simple_debug.
I think it's intentional and safe to have a quick unlocked check of
simple_debug at the start of ecpg_log, since that early exit will
always be taken in non-debug cases.  But we should recheck
simple_debug after acquiring the mutex.  In the worst case, calling
ECPGdebug concurrently with ecpg_log in another thread could result
in a null-pointer dereference due to debugstream transiently being
NULL while simple_debug isn't 0.

This is largely hypothetical, since it's unlikely anybody uses
ECPGdebug() at all in the field, and our own regression tests
don't seem to be hitting the theoretical race conditions either.
Still, if we're going to the trouble of having mutexes here, we ought
to be using them in a way that's actually safe not just almost safe.
Hence, back-patch to all supported branches.
2024-05-23 15:52:06 -04:00
Peter Eisentraut da32f5c4bc jsonapi: Some message style fixes
Add missing punctuation, and un-gettext-mark an internal error.
2024-05-23 09:22:28 +02:00
Peter Eisentraut 6ef762938e doc: Clean up title case use 2024-05-23 08:34:05 +02:00
Michael Paquier f7ab71ba0c Fix typo and comments related to the recent no-wait lock improvements
The argument of dontWait at the top of ProcSleep() was documented
backwards, and there was a typo in lock.c.

Thinkos in 2346df6fc3.

Author: Will Mortensen
Reviewed-by: Jingxian Li, Michael Paquier
Discussion: https://postgr.es/m/CAMpnoC5f+eiS7tdy8PUpd_LacSTVT-pYpVooKfjHRQQmkHPZ2g@mail.gmail.com
2024-05-23 13:47:12 +09:00
Michael Paquier dd087e1c13 doc: Fix column_name parameter in ALTER MATERIALIZED VIEW
Parameter column_name must be an existing column because ALTER
MATERIALIZED VIEW cannot add new columns.  The old description was
likely copied from ALTER TABLE.

Author: Erik Wienhold
Discussion: https://postgr.es/m/6880ca53-7961-4eeb-86d5-6bd05fc2027e@ewie.name
Backpatch-through: 12
2024-05-23 13:02:57 +09:00
David Rowley 8559252095 Fix a couple of outdated comments now that we have MERGE RETURNING
This has been supported since c649fa24a.

Discussion: https://postgr.es/m/CAApHDvpqp6vtUzG-_josUEiBGyqnrnVxJ-VdF+hJLXjHdHzsyQ@mail.gmail.com
2024-05-23 15:24:54 +12:00
Alexander Korotkov fbd4321fd5 Don't copy extended statistics during MERGE/SPLIT partition operations
When MERGE/SPLIT created new partitions, it was cloning the extended
statistics of the parent table.

However, extended stats on partitioned tables don't behave like
indexes on partitioned tables (which exist only to create physical
indexes on child tables).  Rather, extended stats on a parent 1) cause
extended stats to be collected and computed across the whole partition
hierarchy, and 2) do not cause extended stats to be computed for the
individual partitions.

"CREATE TABLE ... PARTITION OF" command doesn't copy extended
statistics.  This commit makes createPartitionTable() behave
consistently.

Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/ZiJW1g2nbQs9ekwK%40pryzbyj2023
Author: Alexander Korotkov, Justin Pryzby
2024-05-23 02:22:41 +03:00
Alexander Korotkov 3a82c689fd Fix the name collision detection in MERGE/SPLIT partition operations
Both MERGE and SPLIT partition operations support the case when the name of the
new partition matches the name of the existing partition to be merged/split.
But the name collision detection doesn't always work as intended.  The SPLIT
partition operation finds the namespace to search for an existing partition
without taking into account the parent's persistence.  The MERGE partition
operation checks for the name collision with simple equal() on RangeVar's
simply ignoring the search_path.

This commit fixes this behavior as follows.
 1. The SPLIT partition operation now finds the namespace to search for
    an existing partition according to the parent's persistence.
 2. The MERGE partition operation now checks for the name collision similarly
    to the SPLIT partition operation using
    RangeVarGetAndCheckCreationNamespace() and get_relname_relid().

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/86b4f1e3-0b5d-315c-9225-19860d64d685%40gmail.com
Author: Dmitry Koval, Alexander Korotkov
2024-05-23 02:21:00 +03:00
Alexander Korotkov 97e5b0026f amcheck: Report an error when the next page to a leaf is not a leaf
This is a very unlikely condition during checking a B-tree unique constraint,
meaning that the index structure is violated badly, and we shouldn't continue
checking to avoid endless loops, etc.  So it's worth immediately throwing an
error.

Reported-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-Wzk%2B2116uOXdOViA27SHcr31WKPgmjsxXLBs_aTxAeThzg%40mail.gmail.com
Author: Pavel Borisov
2024-05-23 02:13:43 +03:00
Alexander Korotkov 0b5c161248 amcheck: Don't load the right sibling page into BtreeCheckState
5ae2087202 implemented a cross-page unique constraint check by loading
the right sibling to the BtreeCheckState.target variable.  This is wrong,
because bt_target_page_check() shouldn't change the target page.  Also,
BtreeCheckState.target shouldn't be changed alone without
BtreeCheckState.targetblock.

However, the above didn't cause any visible bugs for the following reasons.
1. We do a cross-page unique constraint check only for leaf index pages.
2. The only way target page get accessed after a cross-page unique constraint
   check is loading of the lowkey.
3. The only place lowkey is used is bt_child_highkey_check(), and that applies
   only to non-leafs.

The reasons above don't diminish the fact that changing BtreeCheckState.target
for a cross-page unique constraint check is wrong.  This commit changes this
check to temporarily store the right sibling to the local variable.

Reported-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-Wzk%2B2116uOXdOViA27SHcr31WKPgmjsxXLBs_aTxAeThzg%40mail.gmail.com
Author: Pavel Borisov
2024-05-23 02:12:45 +03:00
Alexander Korotkov 532d94fec3 amcheck: Refactoring the storage of the last visible entry
This commit introduces a new data structure BtreeLastVisibleEntry comprising
information about the last visible heap entry with the current value of key.
Usage of this data structure allows us to avoid passing all this information
as individual function arguments.

Reported-by: Alexander Korotkov
Discussion: https://www.postgresql.org/message-id/CAPpHfdsVbB9ToriaB1UHuOKwjKxiZmTFQcEF%3DjuzzC_nby31uA%40mail.gmail.com
Author: Pavel Borisov, Alexander Korotkov
2024-05-23 02:11:14 +03:00
Bruce Momjian bac44bc29a doc PG 17 relnotes: fix pg_stat_reset_shared quoting
Reported-by: torikoshia

Discussion: https://postgr.es/m/8ab708436c369d47fcbb23a8ad775ea7@oss.nttdata.com

Backpatch-through: master
2024-05-22 18:50:33 -04:00
Bruce Momjian d0155ba41e doc PG 17 relnotes: fix pg_stat_statements typo
Reported-by: Masahiko Sawada

Discussion: https://postgr.es/m/CAD21AoB_MR=S_Gh=oeJR4ji0GGY+d8747O-5pYcbMbhGOMtAwQ@mail.gmail.com

Author: Masahiko Sawada

Backpatch-through: master
2024-05-22 18:48:16 -04:00
Bruce Momjian 29a9a632c5 doc PG 17 relnotes: adjust SQL/JSON constructor func. authors
Reported-by: Amit Langote

Discussion: https://postgr.es/m/CA+HiwqHA2_2V-UtdEEjX3wMUcO=pAwH2D=9P9cRYGVcNLJkH+w@mail.gmail.com

Author: Amit Langote

Backpatch-through: master
2024-05-22 18:46:26 -04:00
Bruce Momjian 3551da969e doc PG 17 relnotes: adjust builtin collation provider item
Reported-by: Jeff Davis

Discussion: https://postgr.es/m/92e039f6fabc3567169e95e12b39a04c00f8503b.camel@j-davis.com

Backpatch-through: master
2024-05-22 18:39:43 -04:00
Tom Lane a9a7c2c3e1 Fix input of ISO "extended" time format for types time and timetz.
Commit 3e1a373e2 missed teaching DecodeTimeOnly the same "ptype"
manipulations it added to DecodeDateTime.  While likely harmless
at the time, it became a problem after 5b3c59535 added an error check
that ptype must be zero once we exit the parsing loop (that is, there
shouldn't be any unused prefixes).  The consequence was that we'd
reject time or timetz input like T12:34:56 (the "extended" format
per ISO 8601-1:2019), even though that still worked in timestamp
input.

Since this is clearly under-tested code, add test cases covering all
the ISO 8601 time formats.  (Note: although 8601 allows just "Thh",
we have never accepted that, and this patch doesn't change that.
I'm content to leave that as-is because it seems too likely to be
a mistake rather than intended input.  If anyone wants to allow
that, it should be a separate patch anyway, and not back-patched.)

Per bug #18470 from David Perez.  Back-patch to v16 where we
broke it.

Discussion: https://postgr.es/m/18470-34fad4c829106848@postgresql.org
2024-05-22 18:22:58 -04:00
Bruce Momjian d2a338e060 doc PG 17 relnotes: add Heikki Linnakangas to vacuum item
Reported-by: Melanie Plageman

Discussion: https://postgr.es/m/CAAKRu_YYR5MXY-xuCpr7DKKugCExTSjRy9Ax8c-z7LKa8dDfwg@mail.gmail.com

Author: Melanie Plageman

Backpatch-through: master
2024-05-22 17:59:22 -04:00
Tom Lane 5278668d7a Fix handling of extended expression statistics in CREATE TABLE LIKE.
transformTableLikeClause believed that it could process extended
statistics immediately because "the representation of CreateStatsStmt
doesn't depend on column numbers".  That was true when extended stats
were first introduced, but it was falsified by the addition of
extended stats on expressions: the parsed expression tree is fed
forward by the LIKE option, and that will contain Vars.  So if the
new table doesn't have attnums identical to the old one's (typically
because there are some dropped columns in the old one), that doesn't
work.  The CREATE goes through, but it emits invalid statistics
objects that will cause problems later.

Fortunately, we already have logic that can adapt expression trees
to the possibly-new column numbering.  To use it, we have to delay
processing of CREATE_TABLE_LIKE_STATISTICS into expandTableLikeClause,
just as for other LIKE options that involve expressions.

Per bug #18468 from Alexander Lakhin.  Back-patch to v14 where
extended statistics on expressions were added.

Discussion: https://postgr.es/m/18468-f5add190e3fa5902@postgresql.org
2024-05-22 17:54:17 -04:00
Robert Haas c37267162e Fix generate_union_paths for non-sortable types.
The previous logic would fail to set groupList when
grouping_is_sortable() returned false, which could cause queries
to return wrong answers when some columns were not sortable.

David Rowley, reviewed by Heikki Linnakangas and Álvaro Herrera.
Reported by Hubert "depesz" Lubaczewski.

Discussion: http://postgr.es/m/Zktzf926vslR35Fv@depesz.com
Discussion: http://postgr.es/m/CAApHDvra=c8_zZT0J-TftByWN2Y+OJfnjNJFg4Dfdi2s+QzmqA@mail.gmail.com
2024-05-21 12:54:09 -04:00
Robert Haas 12933dc604 Re-allow planner to use Merge Append to efficiently implement UNION.
This reverts commit 7204f35919,
thus restoring 66c0185a3 (Allow planner to use Merge Append to
efficiently implement UNION) as well as the follow-on commits
d5d2205c8, 3b1a7eb28, 7487044d6.

Per further discussion on pgsql-release, we wish to ship beta1 with
this feature, and patch the bug that was found just before wrap,
rather than shipping beta1 with the feature reverted.
2024-05-21 12:44:51 -04:00
Robert Haas 3bd7b2f465 Doc: return 66c0185a3 to the release notes.
This reverts commit e1e83a7171.

Per further discussion on pgsql-release, we wish to ship beta1 with
that feature, and patch the bug, rather than shipping beta1 with
that feature reverted.
2024-05-21 12:44:21 -04:00
Tom Lane 86a2d2a321 Stamp 17beta1. 2024-05-20 17:42:50 -04:00
Tom Lane e1e83a7171 Doc: remove 66c0185a3 from release notes.
Discussion: https://postgr.es/m/Zktzf926vslR35Fv@depesz.com
(also some private discussion among pgsql-release)
2024-05-20 15:16:17 -04:00
Tom Lane 7204f35919 Revert commit 66c0185a3 and follow-on patches.
This reverts 66c0185a3 (Allow planner to use Merge Append to
efficiently implement UNION) as well as the follow-on commits
d5d2205c8, 3b1a7eb28, 7487044d6.  In addition to those, 07746a8ef
had to be removed then re-applied in a different place, because
66c0185a3 moved the relevant code.

The reason for this last-minute thrashing is that depesz found a
case in which the patched code creates a completely wrong plan
that silently gives incorrect query results.  It's unclear what
the cause is or how many cases are affected, but with beta1 wrap
staring us in the face, there's no time for closer investigation.
After we figure that out, we can decide whether to un-revert this
for beta2 or hold it for v18.

Discussion: https://postgr.es/m/Zktzf926vslR35Fv@depesz.com
(also some private discussion among pgsql-release)
2024-05-20 15:08:30 -04:00
Bruce Momjian d2a04470aa doc PG 17 relnotes: adjust vacuum items
Reported-by: John Naylor

Discussion: https://postgr.es/m/CANWCAZbPEoFcSjedGsz4AV=_sbwUN4sgjrukVCu-JzrqFC5Hhw@mail.gmail.com

Author: John Naylor

Backpatch-through: master
2024-05-20 09:36:58 -04:00
Peter Eisentraut 18cbed13d5 Translation updates
Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git
Source-Git-Hash: 647792ce18e56f51614f7559106ad15362c5d1cc
2024-05-20 12:04:11 +02:00
Bruce Momjian fa25dfcd7e doc PG 17 relnotes: adjust vacuum item to use "or"
Reported-by: David Rowley

Discussion: https://postgr.es/m/CAApHDvrR1ZQ69keUwr5_BGo2iWNqhpZooZSz2g96KnOxO0_GTw@mail.gmail.com

Backpatch-through: master
2024-05-19 20:12:42 -04:00
Bruce Momjian acecd6746c doc PG 17 relnotes: adjust "builtin" collation provider
Reported-by: Daniel Verite

Discussion: https://postgr.es/m/13447ff6-15fd-4137-8339-f4fddda7eb11@manitou-mail.org

Backpatch-through: master
2024-05-18 17:52:56 -04:00
Bruce Momjian 15b4d46308 doc PG 17 relnotes: update to current
Reported-by: jian he

Discussion: https://postgr.es/m/CACJufxE7fbWckFeXdW86VTia2BV+LOcfNR-aPf1cP2fjxEB0Aw@mail.gmail.com

Backpatch-through: master
2024-05-18 17:43:37 -04:00
Tom Lane 779ac2c74b Add test case showing that commit d0d44049d fixed a live bug.
When I committed d0d44049d (Account for optimized MinMax aggregates
during SS_finalize_plan), I didn't have a test case showing that it
was fixing any reachable bug.  Here is one, based on bug #18465 from
Hal Takahara.  Without the fix, all rows of the result show the same
"min" value, because the aggregate doesn't get recalculated.

Committed despite beta1 release freeze, with the concurrence of
pgsql-release.

Discussion: https://postgr.es/m/18465-2fae927718976b22@postgresql.org
Discussion: https://postgr.es/m/2391880.1689025003@sss.pgh.pa.us
2024-05-18 14:26:13 -04:00
Bruce Momjian 3f49df98d8 doc PG 17 relnotes: add incremental JSON parser item
Reported-by: Andrew Dunstan

Discussion: https://postgr.es/m/e48dbf1e-62c9-4dbb-8b42-bb9ed898a0ab@dunslane.net

Backpatch-through: master
2024-05-18 12:50:22 -04:00
Bruce Momjian 5829444879 doc PG 17 relnotes: improve JSON casting item
Reported-by: jian he

Discussion: https://postgr.es/m/CACJufxE0HY19F8Oo-wb-+i4bKDamiaL_aUV8qB69_8mwoScZow@mail.gmail.com

Backpatch-through: master
2024-05-18 12:13:59 -04:00
Bruce Momjian b67478b99b doc PG 17 relnotes: adjust vacuum memory item
Reported-by: David Rowley

Discussion: https://postgr.es/m/CAApHDvpZnr+wRMX5Wic9Na60fZSbruEffMoECVubBjv483jV2w@mail.gmail.com

Backpatch-through: master
2024-05-18 10:39:47 -04:00
Tom Lane 70353e463c Sync typedefs.list with buildfarm, for real this time.
In commit da256a4a7, I manually added some typedef names to the
buildfarm-generated list so as not to cause any formatting regressions
compared to the prior manually-updated list.

About half of the additions were injection-point-related names.
It turns out that those were missing because none of the buildfarm
animals contributing typedef lists were building with
--enable-injection-points.  I rectified that on my animal sifaka,
and now those are in the list available from the buildfarm.

The other half were typedefs that didn't show up in the generated list
because our method for collecting that doesn't catch names that are
not used to declare any C variables or fields.  Such a typedef name
doesn't really add a lot of value, so we decided to get rid of them,
and that's now been done in commits 110eb4aef and be5942aee.  (Note:
I'm pretty sure there are some remaining cases of that, but we've
already accepted the ensuing odd formatting of the typedef declaration
itself.  The present fixes only dealt with typedefs that had been
manually added to typedefs.list during the v17 development cycle.)

Hence, we can now install a verbatim copy of the buildfarm's list
and not have it affect anything.  The only change is to add
InjectionPointCallback, which I'd omitted from da256a4a7 because
it chanced not to affect any pgindent decisions.

Discussion: https://postgr.es/m/1919000.1715815925@sss.pgh.pa.us
2024-05-17 11:41:24 -04:00
Peter Eisentraut e9b7aee272 A few follow-up fixes for GUC name quoting
Fixups for 17974ec259: Some messages were missed (and some were new
since the patch was originally proposed), and there was a typo
introduced.
2024-05-17 13:48:31 +02:00
Peter Eisentraut 17974ec259 Revise GUC names quoting in messages again
After further review, we want to move in the direction of always
quoting GUC names in error messages, rather than the previous (PG16)
wildly mixed practice or the intermittent (mid-PG17) idea of doing
this depending on how possibly confusing the GUC name is.

This commit applies appropriate quotes to (almost?) all mentions of
GUC names in error messages.  It partially supersedes a243569bf6 and
8d9978a717, which had moved things a bit in the opposite direction
but which then were abandoned in a partial state.

Author: Peter Smith <smithpb2250@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w%40mail.gmail.com
2024-05-17 11:44:26 +02:00
Peter Eisentraut be5942aee7 Remove unused typedefs
There were a few typedefs that were never used to define a variable or
field.  This had the effect that the buildfarm's typedefs.list would
not include them, and so they would need to be re-added manually to
keep the overall pgindent result perfectly clean.

We can easily get rid of these typedefs to avoid the issue.  In a few
cases, we just let the enum or struct stand on its own without a
typedef around it.  In one case, an enum was abused to define flag
bits; that's better done with macro definitions.

This fixes all the remaining issues with missing entries in the
buildfarm's typedefs.list.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/1919000.1715815925@sss.pgh.pa.us
2024-05-17 07:36:12 +02:00
Michael Paquier 110eb4aefb Remove enum WaitEventExtension
This enum was used to determine the first ID to use when assigning a
custom wait event for extensions, which is always 1.  It was kept so
as it would be possible to add new in-core wait events in the category
"Extension".  There is no such thing currently, so let's remove this
enum until a case justifying it pops up.  This makes the code simpler
and easier to understand.

This has as effect to switch back autoprewarm.c to use PG_WAIT_EXTENSION
rather than WAIT_EVENT_EXTENSION, on par with v16 and older stable
branches.

Thinko in c9af054653.

Reported-by: Peter Eisentraut
Discussion: https://postgr.es/m/195c6c45-abce-4331-be6a-e87724e1d060@eisentraut.org
2024-05-17 12:29:57 +09:00
Noah Misch 372700cf30 Fix documentation about DROP DATABASE FORCE process termination rights.
Specifically, it terminates a background worker even if the caller
couldn't terminate the background worker with pg_terminate_backend().
Commit 3a9b18b309 neglected to update
this.  Back-patch to v13, which introduced DROP DATABASE FORCE.

Reviewed by Amit Kapila.  Reported by Kirill Reshke.

Discussion: https://postgr.es/m/20240429212756.60.nmisch@google.com
2024-05-16 14:11:00 -07:00
Melanie Plageman a3e6c6f929 BitmapHeapScan: Remove incorrect assert and reset field
04e72ed617 pushed the skip fetch optimization (allowing bitmap heap
scans to operate like index-only scans if none of the underlying data is
needed) into heap AM implementations of bitmap table scan callbacks.

04e72ed617 added an assert that all tuples in blocks eligible for the
optimization had been NULL-filled and emitted by the end of the scan.
This assert is incorrect when not all tuples need be scanned to execute
the query; for example: a join in which not all inner tuples need to be
scanned before skipping to the next outer tuple.

Remove the assert and reset the field on which it previously asserted to
avoid incorrectly emitting NULL-filled tuples from a previous scan on
rescan.

Author: Melanie Plageman
Reviewed-by: Tomas Vondra, Michael Paquier, Alvaro Herrera
Reported-by: Melanie Plageman
Reproduced-by: Tomas Vondra, Richard Guo
Discussion: https://postgr.es/m/CAMbWs48orzZVXa7-vP9Nt7vQWLTE04Qy4PePaLQYsVNQgo6qRg%40mail.gmail.com
2024-05-16 11:00:43 -04:00
Heikki Linnakangas fb5718f35f Remove option to fall back from direct to postgres SSL negotiation
There were three problems with the sslnegotiation options:

1. The sslmode=prefer and sslnegotiation=requiredirect combination was
somewhat dangerous, as you might unintentionally fall back to
plaintext authentication when connecting to a pre-v17 server.

2. There was an asymmetry between 'postgres' and 'direct'
options. 'postgres' meant "try only traditional negotiation", while
'direct' meant "try direct first, and fall back to traditional
negotiation if it fails". That was apparent only if you knew that the
'requiredirect' mode also exists.

3. The "require" word in 'requiredirect' suggests that it's somehow
more strict or more secure, similar to sslmode. However, I don't
consider direct SSL connections to be a security feature.

To address these problems:

- Only allow sslnegotiation='direct' if sslmode='require' or
stronger. And for the record, Jacob and Robert felt that we should do
that (or have sslnegotiation='direct' imply sslmode='require') anyway,
regardless of the first issue.

- Remove the 'direct' mode that falls back to traditional negotiation,
and rename what was called 'requiredirect' to 'direct' instead. In
other words, there is no "try both methods" option anymore, 'postgres'
now means the traditional negotiation and 'direct' means a direct SSL
connection.

Reviewed-by: Jelte Fennema-Nio, Robert Haas, Jacob Champion
Discussion: https://www.postgresql.org/message-id/d3b1608a-a1b6-4eda-9ec5-ddb3e4375808%40iki.fi
2024-05-16 17:17:37 +03:00
Robert Haas 8ba3462833 Document that increasing max_connections uses more resources.
Roberto Mello

Discussion: http://postgr.es/m/CAKz==bJBCWrvN77fmuZ2XqD3jazWEb=E80AA4Yv9C9tQ61YDdQ@mail.gmail.com
2024-05-16 08:46:08 -04:00
David Rowley fa65a022db Doc: use true|false rather than on|off for "failover" option
The CREATE SUBSCRIPTION documentation mentions "false" is the default
option, so let's use true|false rather than on|off in the text which
talks about this option in the ALTER SUBSCRIPTION page.

The other boolean options mentioned in create_subscription.sgml use true
and false so it makes sense to be consistent with these.  The "failover"
option is new to v17.

Author: Peter Smith
Discussion: https://postgr.es/m/CAHut+Ps-RqrggaJU5w85BbeQzw9CLmmLgADVJoJ=xx_4D5CWvw@mail.gmail.com
2024-05-17 00:39:15 +12:00