8000 PG12: Update from upstream (12.7.0) by jvillarf · Pull Request #34 · CartoDB/postgres · GitHub
[go: up one dir, main page]

Skip to content

PG12: Update from upstream (12.7.0) #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 630 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
630 commits
Select commit Hold shift + click to select a range
3da1110
doc: clarify how to find pg_type_d.h in the install tree
bmomjian Nov 16, 2020
139c439
doc: update bgwriter description
bmomjian Nov 16, 2020
029fa66
Use "true" not "TRUE" in one ICU function call.
tglsfdc Nov 16, 2020
54a9406
Do not return NULL for error cases in satisfies_hash_partition().
tglsfdc Nov 16, 2020
4097a79
Don't Insert() a VFD entry until it's fully built.
tglsfdc Nov 17, 2020
87ab464
Further fixes for CREATE TABLE LIKE: cope with self-referential FKs.
tglsfdc Nov 19, 2020
2ded1f1
Adjust DSM and DSA slot usage constants (back-patch).
macdice Nov 19, 2020
5b83604
On macOS, use -isysroot in link steps as well as compile steps.
tglsfdc Nov 20, 2020
888fa2b
Skip allocating hash table in EXPLAIN-only mode.
hlinnaka Nov 20, 2020
ae5aa26
Properly check index mark/restore in ExecSupportsMarkRestore.
RhodiumToad Nov 24, 2020
b608645
doc: Fix typos
petere Nov 25, 2020
ea7a167
In psql's \d commands, don't truncate attribute default values.
tglsfdc Nov 25, 2020
fce17e4
Fix CLUSTER progress reporting of number of blocks scanned.
MasaoFujii Nov 27, 2020
cbc7a7a
Fix a recently-introduced race condition in LISTEN/NOTIFY handling.
tglsfdc Nov 28, 2020
7b5b90b
Retry initial slurp_file("current_logfiles"), in test 004_logrotate.pl.
nmisch Nov 29, 2020
db83c04
Doc: clarify behavior of PQconnectdbParams().
tglsfdc Nov 29, 2020
3958abd
Fix recently-introduced breakage in psql's \connect command.
tglsfdc Nov 29, 2020
ee42f78
Remove leftover comments, left behind by removal of WITH OIDS.
hlinnaka Nov 30, 2020
4f728a1
Fix miscomputation of direct_lateral_relids for join relations.
tglsfdc Nov 30, 2020
16a1e1e
Prevent parallel index build in a standalone backend.
tglsfdc Nov 30, 2020
ef1a785
Remove configure-time probe for DocBook DTD.
tglsfdc Nov 30, 2020
b2603f1
Document concurrent indexes waiting on each other
alvherre Nov 30, 2020
50f3385
Free disk space for dropped relations on commit.
macdice Dec 1, 2020
f0ff52f
Avoid memcpy() with a NULL source pointer and count == 0
alvherre Dec 1, 2020
5f9b05a
Ensure that expandTableLikeClause() re-examines the same table.
tglsfdc Dec 1, 2020
c50b6f7
pg_checksums: data_checksum_version is unsigned so use %u not %d
bmomjian Dec 2, 2020
020f153
Fix pg_rewind bugs when rewinding a standby server.
hlinnaka Dec 3, 2020
d415eec
docs: list single-letter options first in command-line summary
bmomjian Dec 3, 2020
f3f033a
doc: remove unnecessary blank before command option text
bmomjian Dec 3, 2020
ad3fb04
Fix race conditions in newly-added test.
hlinnaka Dec 4, 2020
77a94c3
Fix missed step in removal of useless RESULT RTEs in the planner.
tglsfdc Dec 5, 2020
98f8cdd
Fix more race conditions in the newly-added pg_rewind test.
hlinnaka Dec 7, 2020
fa7a52f
backpatch "jit: Add support for LLVM 12."
anarazel Nov 10, 2020
b07490b
jit: configure: Explicitly reference 'native' component.
anarazel Dec 8, 2020
27b57f8
jit: Correct parameter type for generated expression evaluation funct…
anarazel Dec 8, 2020
d7ecba9
pgcrypto: Detect errors with EVP calls from OpenSSL
michaelpq Dec 8, 2020
101c8ae
Doc: explain that the string types can't store \0 (ASCII NUL).
tglsfdc Dec 8, 2020
e824ddc
Doc: clarify that CREATE TABLE discards redundant unique constraints.
tglsfdc Dec 8, 2020
2f1997b
Teach contain_leaked_vars that assignment SubscriptingRefs are leaky.
tglsfdc Dec 8, 2020
035c7df
initdb: properly alphabetize getopt_long options in C string
bmomjian Dec 12, 2020
8e456b8
initdb: complete getopt_long alphabetization 8000
bmomjian Dec 12, 2020
706d84f
Revert "Cannot use WL_SOCKET_WRITEABLE without WL_SOCKET_READABLE."
jeff-davis Dec 15, 2020
bf88c6d
Use native methods to open input in TestLib::slurp_file on Windows.
adunstan Dec 15, 2020
f32c687
doc: clarify COPY TO for partitioning/inheritance
bmomjian Dec 16, 2020
ba04ced
Avoid memcpy() with same source and destination during relmapper init.
tglsfdc Dec 18, 2020
3989fda
Doc: improve description of pgbench script weights.
tglsfdc Dec 20, 2020
def510c
Doc: fix description of how to use src/tutorial files.
tglsfdc Dec 20, 2020
38bef9e
Remove "invalid concatenation of jsonb objects" error case.
tglsfdc Dec 21, 2020
f581e53
Improve autoprewarm's handling of early-shutdown scenarios.
tglsfdc Dec 22, 2020
67a9411
Fix portability issues with parsing of recovery_target_xid
michaelpq Dec 23, 2020
8985e02
docs: document which server-side languages can create procs
bmomjian Dec 23, 2020
3d8068e
Fix race condition between shutdown and unstarted background workers.
tglsfdc Dec 24, 2020
f853ffa
Avoid time-of-day-dependent failure in log rotation test.
tglsfdc Dec 25, 2020
c966988
Invalidate acl.c caches when pg_authid changes.
nmisch Dec 25, 2020
e792ca4
postgres_fdw: Fix connection leak.
MasaoFujii Dec 28, 2020
190f0af
Fix inconsistent code with shared invalidations of snapshots
michaelpq Dec 28, 2020
fd1347f
Fix thinko in plpgsql memory leak fix.
tglsfdc Dec 28, 2020
d379659
Further fix thinko in plpgsql memory leak fix.
tglsfdc Dec 28, 2020
b3a5bf7
Fix bugs in libpq's GSSAPI encryption support.
tglsfdc Dec 28, 2020
4cfdd8a
Fix assorted issues in backend's GSSAPI encryption support.
tglsfdc Dec 28, 2020
7ed616f
Improve log messages related to pg_hba.conf not matching a connection.
tglsfdc Dec 28, 2020
9ad2689
doc: Improve some grammar and sentences
michaelpq Dec 29, 2020
635140a
In pg_upgrade cross-version test, handle lack of oldstyle_length().
nmisch Dec 30, 2020
3ca1949
Fix up usage of krb_server_keyfile GUC parameter.
tglsfdc Dec 30, 2020
e3bfdf2
Doc: spell out comparison behaviors for the date/time types.
tglsfdc Dec 30, 2020
4f70e09
Fix index deletion latestRemovedXid bug.
petergeoghegan Dec 31, 2020
5f95664
Get heap page max offset with buffer lock held.
petergeoghegan Dec 31, 2020
5706c48
Doc: improve explanation of EXTRACT(EPOCH) for timestamp without tz.
tglsfdc Jan 1, 2021
9a968e7
Update copyright for 2021
bmomjian Jan 2, 2021
7c98759
Fix integer-overflow corner cases in substring() functions.
tglsfdc Jan 4, 2021
258b770
Fix numeric_power() when the exponent is INT_MIN.
deanrasheed Jan 5, 2021
740780a
Add an explicit cast to double when using fabs().
deanrasheed Jan 5, 2021
3e9cea2
doc: improve NLS instruction wording
bmomjian Jan 5, 2021
c919ed1
doc: Fix description about default behavior of recovery_target_timeline.
MasaoFujii Jan 6, 2021
9f540f8
Detect the deadlocks between backends and the startup process.
MasaoFujii Jan 6, 2021
820f882
doc: Remove reference to recovery params for divergence lookup in pg_…
michaelpq Jan 7, 2021
f2a69e9
Further second thoughts about idle_session_timeout patch.
tglsfdc Jan 7, 2021
29556bf
Adjust createdb TAP tests to work on recent OpenBSD.
tglsfdc Jan 8, 2021
8354371
Fix ancient bug in parsing of BRE-mode regular expressions.
tglsfdc Jan 8, 2021
931c0bd
doc: expand description of how non-SELECT queries are processed
bmomjian Jan 9, 2021
ddf0be8
Fix thinko in comment
alvherre Jan 12, 2021
a2768e4
Doc: fix description of privileges needed for ALTER PUBLICATION.
tglsfdc Jan 12, 2021
436d9c5
pg_dump: label INDEX ATTACH ArchiveEntries with an owner.
tglsfdc Jan 12, 2021
0b2ae3c
Fix memory leak in SnapBuildSerialize.
Jan 13, 2021
0363b7e
Doc: clarify behavior of back-half options in pg_dump.
tglsfdc Jan 13, 2021
3e214fa
Disallow a digit as the first character of a variable name in pgbench.
tglsfdc Jan 13, 2021
259b212
Call out vacuum considerations in create index docs
alvherre Jan 13, 2021
c9b7025
Prevent drop of tablespaces used by partitioned relations
alvherre Jan 14, 2021
0d221ec
pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
tglsfdc Jan 14, 2021
19a1d76
Fix calculation of how much shared memory is required to store a TOC.
MasaoFujii Jan 15, 2021
f5d044e
Improve our heuristic for selecting PG_SYSROOT on macOS.
tglsfdc Jan 15, 2021
943a113
Disallow CREATE STATISTICS on system catalogs
tvondra Jan 15, 2021
66087f7
Prevent excess SimpleLruTruncate() deletion.
nmisch Jan 16, 2021
a0d31b1
Fix pg_dump for GRANT OPTION among initial privileges.
nmisch Jan 16, 2021
ba80489
Avoid crash with WHERE CURRENT OF and a custom scan plan.
tglsfdc Jan 18, 2021
6b74362
doc: adjust alignment of doc file list for "pg_waldump.sgml"
bmomjian Jan 18, 2021
6253159
Remove faulty support for MergeAppend plan with WHERE CURRENT OF.
tglsfdc Jan 19, 2021
5ad672f
Fix ALTER DEFAULT PRIVILEGES with duplicated objects
michaelpq Jan 20, 2021
0326635
Fix bug in detecting concurrent page splits in GiST insert
hlinnaka Jan 20, 2021
53a24fa
Disable vacuum page skipping in selected test cases.
tglsfdc Jan 20, 2021
561dd8d
Further tweaking of PG_SYSROOT heuristics for macOS.
tglsfdc Jan 20, 2021
1cce024
Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar.
tglsfdc Jan 21, 2021
878cf60
Doc: remove misleading claim in documentation of PQreset().
tglsfdc Jan 22, 2021
29ba005
Doc: improve directions for building on macOS.
tglsfdc Jan 22, 2021
5db6ba3
Update time zone data files to tzdata release 2021a.
tglsfdc Jan 24, 2021
06cdfe2
Fix hypothetical bug in heap backward scans
david-rowley Jan 25, 2021
4641b2a
Fix broken ruleutils support for function TRANSFORM clauses.
tglsfdc Jan 25, 2021
820aa9e
Don't clobber the calling user's credentials cache in Kerberos test.
tglsfdc Jan 25, 2021
82f97d3
Code review for psql's helpSQL() function.
tglsfdc Jan 26, 2021
fdf9d00
Report the true database name on connection errors
alvherre Jan 26, 2021
d43e235
doc: Remove reference to views for TRUNCATE privilege
michaelpq Jan 27, 2021
30f912a
Don't add bailout adjustment for non-strict deserialize calls.
RhodiumToad Jan 28, 2021
30854d9
pgbench: Remove dead code
alvherre Jan 28, 2021
25f9a72
Make ecpg's rjulmdy() and rmdyjul() agree with their declarations.
tglsfdc Jan 28, 2021
7c53a80
Fix hash partition pruning with asymmetric partition sets.
tglsfdc Jan 28, 2021
22f71a6
Silence another gcc 11 warning.
tglsfdc Jan 28, 2021
bd63661
Document behavior of the .** jsonpath accessor in the lax mode
akorotkov Jan 29, 2021
be843ce
Fix CREATE INDEX CONCURRENTLY for simultaneous prepared transactions.
nmisch Jan 30, 2021
7428469
Fix ancient memory leak in contrib/auto_explain.
tglsfdc Feb 2, 2021
78fab84
Remove extra increment of plpgsql's statement counter for FOR loops.
tglsfdc Feb 2, 2021
1dd6baf
pg_dump: Fix dumping of inherited generated columns
petere Feb 3, 2021
77e760d
Avoid crash when rolling back within a prepared statement.
tglsfdc Feb 4, 2021
9b0ce89
Fix backslash-escaping multibyte chars in COPY FROM.
hlinnaka Feb 5, 2021
f733219
Disallow converting an inheritance child table to a view.
tglsfdc Feb 6, 2021
2a7664a
Propagate CTE property flags when copying a CTE list into a rule.
tglsfdc Feb 7, 2021
46f2971
Revert "Propagate CTE property flags when copying a CTE list into a r…
tglsfdc Feb 7, 2021
e474abd
Release notes for 13.2, 12.6, 11.11, 10.16, 9.6.21, 9.5.25.
tglsfdc Feb 7, 2021
f50e888
Fix permission checks on constraint violation errors on partitions.
hlinnaka Feb 8, 2021
392c530
Last-minute updates for release notes.
tglsfdc Feb 8, 2021
7384435
Translation updates
petere Feb 8, 2021
1b9eb7c
Stamp 12.6.
tglsfdc Feb 8, 2021
85edb1f
Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY
michaelpq Feb 10, 2021
5b2945e
Fix ORDER BY clause in new regression test of REINDEX CONCURRENTLY
michaelpq Feb 10, 2021
0347470
Avoid divide-by-zero in regex_selectivity() with long fixed prefix.
tglsfdc Feb 12, 2021
c3dc311
pg_attribute_no_sanitize_alignment() macro
tglsfdc Feb 13, 2021
840eda0
Hold interrupts while running dsm_detach() callbacks.
macdice Feb 15, 2021
a27f3a7
Default to wal_sync_method=fdatasync on FreeBSD.
macdice Feb 15, 2021
2b81444
Make ExecGetInsertedCols() and friends more robust and improve comments.
hlinnaka Feb 15, 2021
6a31b48
Fix typo
mhagander Feb 17, 2021
e7cddb5
Fix another ancient bug in parsing of BRE-mode regular expressions.
tglsfdc Feb 19, 2021
fadcc4e
Fix bug in COMMIT AND CHAIN command.
MasaoFujii Feb 19, 2021
67b3ee2
Fix psql's ON_ERROR_ROLLBACK so that it handles COMMIT AND CHAIN.
MasaoFujii Feb 19, 2021
2796ae2
Reinstate HEAP_XMAX_LOCK_ONLY|HEAP_KEYS_UPDATED as allowed
alvherre Feb 23, 2021
3b2af88
Fix some typos, grammar and style in docs and comments
michaelpq Feb 24, 2021
9e9b5c0
doc: Mention PGDATABASE as supported by pgbench
michaelpq Feb 25, 2021
fb1e218
Doc: further clarify libpq's description of connection string URIs.
tglsfdc Feb 26, 2021
262eb99
Fix use-after-free bug with AfterTriggersTableData.storeslot
alvherre Feb 27, 2021
0f1b0c0
Fix duplicated test case in TAP tests of reindexdb
michaelpq Mar 2, 2021
f927767
Use native path separators to pg_ctl in initdb
alvherre Mar 2, 2021
c267ca6
Clarify the usage of max_replication_slots on the subscriber side.
Mar 3, 2021
8fff8a8
Validate the OID argument of pg_import_system_collations().
tglsfdc Mar 8, 2021
74207b8
Doc: improve introductory information about procedures.
tglsfdc Mar 10, 2021
5645a6a
tutorial: land height is "elevation", not "altitude"
bmomjian Mar 11, 2021
57ae788
Drop index behind pg_upgrade test issue.
petergeoghegan Mar 11, 2021
1cc33ab
Drop other index behind pg_upgrade test issue.
petergeoghegan Mar 11, 2021
56defbd
Re-simplify management of inStart in pqParseInput3's subroutines.
tglsfdc Mar 11, 2021
ce54c02
Restore vacuum_cleanup_index_scale_factor coverage.
petergeoghegan Mar 11, 2021
e7f7950
Forbid marking an identity column as nullable.
tglsfdc Mar 12, 2021
60e5c2b
Fix race condition in psql \e's detection of file modification.
tglsfdc Mar 12, 2021
6e34755
Avoid corner-case memory leak in SSL parameter processing.
tglsfdc Mar 16, 2021
8fa2478
Fix race in Parallel Hash Join batch cleanup.
macdice Mar 17, 2021
b9ed856
Revert "Fix race in Parallel Hash Join batch cleanup."
macdice Mar 17, 2021
2111b40
Prevent buffer overrun in read_tablespace_map().
tglsfdc Mar 17, 2021
a5eb70c
Fix function name in error hint
mhagander Mar 18, 2021
fbcc9fe
Don't leak rd_statlist when a relcache entry is dropped.
tglsfdc Mar 19, 2021
1452a0b
Don't run RelationInitTableAccessMethod in a long-lived context.
tglsfdc Mar 19, 2021
92bc14a
Don't leak compiled regex(es) when an ispell cache entry is dropped.
tglsfdc Mar 19, 2021
fc552f8
Don't leak malloc'd strings when a GUC setting is rejected.
tglsfdc Mar 19, 2021
4eca51d
Don't leak malloc'd error string in libpqrcv_check_conninfo().
tglsfdc Mar 19, 2021
992cba9
Fix memory leak when initializing DH parameters in backend
tglsfdc Mar 20, 2021
2f31414
Fix memory leak when rejecting bogus DH parameters.
tglsfdc Mar 20, 2021
4b1dd9b
Fix timeline assignment in checkpoints with 2PC transactions
michaelpq Mar 21, 2021
c0849e4
Fix new TAP test for 2PC transactions and PITRs on Windows
michaelpq Mar 22, 2021
4220e06
pg_waldump: Fix bug in per-record statistics.
MasaoFujii Mar 23, 2021
1c457b8
Use correct spelling of statistics kind
tvondra Mar 23, 2021
beac4bd
Fix psql's \connect command some more.
tglsfdc Mar 23, 2021
73cce16
Fix bug in WAL replay of COMMIT_TS_SETTS record.
MasaoFujii Mar 25, 2021
292b7d9
Remove StoreSingleInheritance reimplementation
alvherre Mar 25, 2021
366aa37
Document lock obtained during partition detach
alvherre Mar 25, 2021
88acb01
Fix ndistinct estimates with system attributes
tvondra Mar 26, 2021
3c3221a
doc: Define TLS as an acronym
sfrost Mar 28, 2021
cf8384a
Update obsolete comment.
Mar 30, 2021
448e86c
Add a docs section for obsoleted and renamed functions and settings
sfrost Mar 31, 2021
a126a95
doc: Clarify use of ACCESS EXCLUSIVE lock in various sections
michaelpq Apr 1, 2021
84c5e0d
Fix pg_restore's misdesigned code for detecting archive file format.
tglsfdc Apr 1, 2021
bada628
Improve stability of test with vacuum_truncate in reloptions.sql
michaelpq Apr 2, 2021
d6ca789
doc: mention that intervening major releases can be skipped
bmomjian Apr 2, 2021
6773570
doc: Clarify how to generate backup files with non-exclusive backups
michaelpq Apr 2, 2021
24bcce3
pg_checksums: Fix progress reporting.
MasaoFujii Apr 2, 2021
53f5c2d
Clarify documentation of RESET ROLE
jconway Apr 2, 2021
6972d91
Use macro MONTHS_PER_YEAR instead of '12' in /ecpg/pgtypeslib
bmomjian Apr 2, 2021
48b319e
Fix more confusion in SP-GiST.
tglsfdc Apr 4, 2021
dd5b7e4
Shut down transaction tracking at startup process exit.
MasaoFujii Apr 5, 2021
92273d4
Fix potential rare failure in the kerberos TAP tests
michaelpq Apr 7, 2021
847612f
Don't add non-existent pages to bitmap from BRIN
tvondra Apr 7, 2021
d42978c
Fix typos and grammar in documentation and code comments
michaelpq Apr 9, 2021
2bf44fb
Fix typo
mhagander Apr 9, 2021
82dd570
Fix out-of-bound memory access for interval -> char conversion
michaelpq Apr 12, 2021
27011bc
Fix old bug with coercing the result of a COLLATE expression.
tglsfdc Apr 12, 2021
e3ac7d1
Port regress-python3-mangle.mk to Solaris "sed".
nmisch Apr 13, 2021
4749c7f
Use "-I." in directories holding Bison parsers, for Oracle compilers.
nmisch Apr 13, 2021
5f12bc9
Avoid improbable PANIC during heap_update.
tglsfdc Apr 13, 2021
6530df6
Redesign the caching done by get_cached_rowtype().
tglsfdc Apr 13, 2021
a7fcb62
Fix some inappropriately-disallowed uses of ALTER ROLE/DATABASE SET.
tglsfdc Apr 13, 2021
26cf324
doc: Fix typo in example query of SQL/JSON
michaelpq Apr 16, 2021
d380ec9
Allow TestLib::slurp_file to skip contents, and use as needed
adunstan Apr 16, 2021
e4fbd11
Fix typo in commen 8000 t
mhagander Apr 20, 2021
b931304
Only ever test for non-127.0.0.1 addresses on Windows in PostgresNode
adunstan Apr 21, 2021
f7ac005
fix silly perl error in commit d064afc720
adunstan Apr 21, 2021
3fb9310
Fix bugs in RETURNING in cross-partition UPDATE cases.
tglsfdc Apr 22, 2021
05ce4bf
Don't crash on reference to an un-available system column.
tglsfdc Apr 22, 2021
0ecc880
doc: Fix obsolete description about pg_basebackup.
MasaoFujii Apr 23, 2021
b230618
Doc: document EXTRACT(JULIAN ...), improve Julian Date explanation.
tglsfdc Apr 26, 2021
7e76cb1
Fix pg_identify_object_as_address() with event triggers
michaelpq Apr 28, 2021
85a3e0b
Fix use-after-release issue with pg_identify_object_as_address()
michaelpq Apr 28, 2021
824df1c
Doc: fix discussion of how to get real Julian Dates.
tglsfdc Apr 28, 2021
adbcd3e
Improve documentation for default_tablespace on partitioned tables
alvherre Apr 29, 2021
ba86371
Fix some more omissions in pg_upgrade's tests for non-upgradable types.
tglsfdc Apr 29, 2021
89768ee
Disallow calling anything but plain functions via the fastpath API.
tglsfdc Apr 30, 2021
8e9b7c6
Doc: update libpq's documentation for PQfn().
tglsfdc Apr 30, 2021
bd9e46a
Doc: add an example of a self-referential foreign key to ddl.sgml.
tglsfdc Apr 30, 2021
13ff139
Fix ALTER TABLE / INHERIT with generated columns
petere May 4, 2021
bdaa0d2
pg_dump: Fix dump of generated columns in partitions
petere May 4, 2021
72fabd4
Fix OID passed to object-alter hook during ALTER CONSTRAINT
alvherre May 4, 2021
abce26c
Have ALTER CONSTRAINT recurse on partitioned tables
alvherre May 5, 2021
b075e08
Document lock level used by ALTER TABLE VALIDATE CONSTRAINT
alvherre May 6, 2021
cfebc70
AlterSubscription_refresh: avoid stomping on global variable
alvherre May 7, 2021
dc7816e
Release notes for 13.3, 12.7, 11.12, 10.17, 9.6.22.
tglsfdc May 9, 2021
c5edbfe
Translation updates
petere May 10, 2021
3b0f6a7
Prevent integer overflows in array subscripting calculations.
tglsfdc May 10, 2021
a5fa3e0
Fix mishandling of resjunk columns in ON CONFLICT ... UPDATE tlists.
tglsfdc May 10, 2021
a9c718b
Last-minute updates for release notes.
tglsfdc May 10, 2021
4bf0bce
Stamp 12.7.
tglsfdc May 10, 2021
7f7ba3a
Merge tag 'REL_12_7' of https://github.com/postgres/postgres into REL…
Aug 3, 2021
d554e55
Updating CHANGELOG
Aug 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Properly check index mark/restore in ExecSupportsMarkRestore.
Previously this code assumed that all IndexScan nodes supported
mark/restore, which is not true since it depends on optional index AM
support functions. This could lead to errors about missing support
functions in rare edge cases of mergejoins with no sort keys, where an
unordered non-btree index scan was placed on the inner path without a
protecting Materialize node. (Normally, the fact that merge join
requires ordered input would avoid this error.)

Backpatch all the way since this bug is ancient.

Per report from Eugen Konkov on irc.

Discussion: https://postgr.es/m/87o8jn50be.fsf@news-spur.riddles.org.uk
  • Loading branch information
RhodiumToad committed Nov 24, 2020
commit ae5aa26dc39d7729b044013e8b213e79e24e613b
5 changes: 5 additions & 0 deletions src/backend/executor/execAmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ ExecSupportsMarkRestore(Path *pathnode)
{
case T_IndexScan:
case T_IndexOnlyScan:
/*
* Not all index types support mark/restore.
*/
return castNode(IndexPath, pathnode)->indexinfo->amcanmarkpos;

case T_Material:
case T_Sort:
return true;
Expand Down
2 changes: 2 additions & 0 deletions src/backend/optimizer/util/plancat.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent,
info->amhasgettuple = (amroutine->amgettuple != NULL);
info->amhasgetbitmap = amroutine->amgetbitmap != NULL &&
relation->rd_tableam->scan_bitmap_next_block != NULL;
info->amcanmarkpos = (amroutine->ammarkpos != NULL &&
amroutine->amrestrpos != NULL);
info->amcostestimate = amroutine->amcostestimate;
Assert(info->amcostestimate != NULL);

Expand Down
1 change: 1 addition & 0 deletions src/include/nodes/pathnodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ struct IndexOptInfo
bool amhasgettuple; /* does AM have amgettuple interface? */
bool amhasgetbitmap; /* does AM have amgetbitmap interface? */
bool amcanparallel; /* does AM support parallel scan? */
bool amcanmarkpos; /* does AM support mark/restore? */
/* Rather than include amapi.h here, we declare amcostestimate like this */
void (*amcostestimate) (); /* AM's cost estimator */
};
Expand Down
0