Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwLPT-0016JK-RZ for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 12:26:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rwLPS-00Chnw-HF for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 12:26:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwLPR-00Chlu-PU for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 12:26:06 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwLPL-002xiG-Kx for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 12:26:04 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 8DF59300EAAC for ; Mon, 15 Apr 2024 14:25:56 +0200 (CEST) Received: from s980.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 797902E29268; Mon, 15 Apr 2024 14:25:56 +0200 (CEST) Received: from s473.loopia.se (unknown [172.22.191.5]) by s980.loopia.se (Postfix) with ESMTP id 76523220174A; Mon, 15 Apr 2024 14:25:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.21 X-Spam-Level: X-Spam-Status: No, score=-1.21 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=disabled Authentication-Results: s473.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s934.loopia.se ([172.22.191.6]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with UTF8LMTP id luaJ7ZoI-WoP; Mon, 15 Apr 2024 14:25:55 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s934.loopia.se (Postfix) with ESMTPSA id 508767CEAF8; Mon, 15 Apr 2024 14:25:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1713183955; bh=i3h453pwz63Dm8oRVhskuR+sFpVIYqB9SzhXX2uNQxU=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=YqQ2GWydVVDTS82NAmATOjUvJGDKaWJwwTulvaCD+FeqS103kb4Ug/m12rHsmkQNC nLawkVQvIHiCbbb8iAE2TC4X4Fxxr4/aVUBnlNAzKR0FTG6slJUPfQDrbUNeFvDZdf jH0XItCnzbORuAwGZnM9QUPBMod8O6oknNTCY0gDqGfxxAwa4K1d/DjisQbtjcOu6y 4gQRKDcCbgHNWocrE4yQSJykQItcdPJXF2G2qub2fi5lC7TO3bs8Q7ggkMQUk0CyqE B5sLPhgMK9ZLS123cE7VNcxXXx2/MnYHykJY4jr20LjnkBrBwjI7wZNWrR8q2z6sh4 TTN5FTdoLFN3A== From: Daniel Gustafsson Message-Id: <39A535AF-154F-4FFD-B887-3C4EDC362DA4@yesql.se> Content-Type: multipart/mixed; boundary="Apple-Mail=_387381EC-AC34-4F8C-AC3F-E167818182D3" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: Typos in the code and README Date: Mon, 15 Apr 2024 14:25:45 +0200 In-Reply-To: Cc: Heikki Linnakangas , PostgreSQL Developers , Alexander Lakhin To: David Rowley References: <3F577953-A29E-4722-98AD-2DA9EFF2CBB8@yesql.se> <3E020742-206E-4052-83AF-8721190A10E0@yesql.se> X-Mailer: Apple Mail (2.3774.500.171.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_387381EC-AC34-4F8C-AC3F-E167818182D3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 14 Apr 2024, at 13:19, David Rowley wrote: >=20 > On Sat, 13 Apr 2024 at 09:17, Daniel Gustafsson = wrote: >>=20 >>> On 12 Apr 2024, at 23:15, Heikki Linnakangas = wrote: >>> Here's a few more. I've accumulate these over the past couple of = months, keeping them stashed in a branch, adding to it whenever I've = spotted a minor typo while reading the code. >>=20 >> Nice, let's lot all these together. >=20 > Here are a few additional ones to add to that. Thanks. Collecting all the ones submitted here, as well as a few = submitted off-list by Alexander, the patch is now a 3-part patchset of cleanups: 0001 contains the typos and duplicate words fixups, 0002 fixes a = parameter with the wrong name in the prototype and 0003 removes a leftover prototype = which was accidentally left in a refactoring. -- Daniel Gustafsson --Apple-Mail=_387381EC-AC34-4F8C-AC3F-E167818182D3 Content-Disposition: attachment; filename=v2-0003-Remove-unused-function-prototype.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v2-0003-Remove-unused-function-prototype.patch" Content-Transfer-Encoding: quoted-printable =46rom=200179eb26269232832888d5a4b596af9cf1f7bb8b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Daniel=20Gustafsson=20=0A= Date:=20Mon,=2015=20Apr=202024=2014:07:58=20+0200=0ASubject:=20[PATCH=20= v2=203/3]=20Remove=20unused=20function=20prototype=0A=0ACommit=20= aafc05de1bf5=20removed=20StartSlotSyncWorker()=20but=20mistakenly=20left=0A= the=20prototype=20in=20slotsync.h.=20=20Fix=20by=20removing.=0A=0A= Reported-by:=20Alexander=20Lakhin=20=0ADiscussion:=20= https://postgr.es/m/3F577953-A29E-4722-98AD-2DA9EFF2CBB8@yesql.se=0A---=0A= =20src/include/replication/slotsync.h=20|=201=20-=0A=201=20file=20= changed,=201=20deletion(-)=0A=0Adiff=20--git=20= a/src/include/replication/slotsync.h=20= b/src/include/replication/slotsync.h=0Aindex=2061e154b31b..e03c2a005a=20= 100644=0A---=20a/src/include/replication/slotsync.h=0A+++=20= b/src/include/replication/slotsync.h=0A@@=20-27,7=20+27,6=20@@=20extern=20= char=20*CheckAndGetDbnameFromConninfo(void);=0A=20extern=20bool=20= ValidateSlotSyncParams(int=20elevel);=0A=20=0A=20extern=20void=20= ReplSlotSyncWorkerMain(char=20*startup_data,=20size_t=20= startup_data_len)=20pg_attribute_noreturn();=0A-extern=20int=09= StartSlotSyncWorker(void);=0A=20=0A=20extern=20void=20= ShutDownSlotSync(void);=0A=20extern=20bool=20= SlotSyncWorkerCanRestart(void);=0A--=20=0A2.39.3=20(Apple=20Git-146)=0A=0A= --Apple-Mail=_387381EC-AC34-4F8C-AC3F-E167818182D3 Content-Disposition: attachment; filename=v2-0002-Fix-incorrect-parameter-name-in-prototype.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v2-0002-Fix-incorrect-parameter-name-in-prototype.patch" Content-Transfer-Encoding: quoted-printable =46rom=20cd154d3285b2f4f1942f308fa087b79e0a2bdcaa=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Daniel=20Gustafsson=20=0A= Date:=20Mon,=2015=20Apr=202024=2014:05:45=20+0200=0ASubject:=20[PATCH=20= v2=202/3]=20Fix=20incorrect=20parameter=20name=20in=20prototype=0A=0AThe=20= function=20declaration=20for=20select_next_encryption_method=20use=20the=0A= variable=20name=20have_valid_connection,=20so=20fix=20the=20prototype=20= in=20the=0Aheader=20to=20match=20that.=0A=0AReported-by:=20Alexander=20= Lakhin=20=0ADiscussion:=20= https://postgr.es/m/3F577953-A29E-4722-98AD-2DA9EFF2CBB8@yesql.se=0A---=0A= =20src/interfaces/libpq/fe-connect.c=20|=202=20+-=0A=201=20file=20= changed,=201=20insertion(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/src/interfaces/libpq/fe-connect.c=20= b/src/interfaces/libpq/fe-connect.c=0Aindex=209db1700ffb..ec20e3f3a9=20= 100644=0A---=20a/src/interfaces/libpq/fe-connect.c=0A+++=20= b/src/interfaces/libpq/fe-connect.c=0A@@=20-397,7=20+397,7=20@@=20static=20= bool=20init_allowed_encryption_methods(PGconn=20*conn);=0A=20static=20= int=09encryption_negotiation_failed(PGconn=20*conn);=0A=20#endif=0A=20= static=20bool=20connection_failed(PGconn=20*conn);=0A-static=20bool=20= select_next_encryption_method(PGconn=20*conn,=20bool=20= negotiation_failure);=0A+static=20bool=20= select_next_encryption_method(PGconn=20*conn,=20bool=20= have_valid_connection);=0A=20static=20PGPing=20internal_ping(PGconn=20= *conn);=0A=20static=20void=20pqFreeCommandQueue(PGcmdQueueEntry=20= *queue);=0A=20static=20bool=20fillPGconn(PGconn=20*conn,=20= PQconninfoOption=20*connOptions);=0A--=20=0A2.39.3=20(Apple=20Git-146)=0A= =0A= --Apple-Mail=_387381EC-AC34-4F8C-AC3F-E167818182D3 Content-Disposition: attachment; filename=v2-0001-Fix-typos-and-duplicate-words-in-comments.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="v2-0001-Fix-typos-and-duplicate-words-in-comments.patch" Content-Transfer-Encoding: quoted-printable =46rom=209722afdb66c92eba4d30dbe3bc30c9017707bb06=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Daniel=20Gustafsson=20=0A= Date:=20Thu,=2011=20Apr=202024=2014:27:35=20+0200=0ASubject:=20[PATCH=20= v2=201/3]=20Fix=20typos=20and=20duplicate=20words=20in=20comments=0A=0A= This=20fixes=20various=20typos,=20duplicated=20words,=20and=20tiny=20= bits=20of=20whitespace=0Ain=20code=20comments.=0A=0AAuthor:=20Daniel=20= Gustafsson=20=0AAuthor:=20Heikki=20Linnakangas=20= =0AAuthor:=20Alexander=20Lakhin=20=0A= Author:=20David=20Rowley=20=0ADiscussion:=20= https://postgr.es/m/3F577953-A29E-4722-98AD-2DA9EFF2CBB8@yesql.se=0A---=0A= =20contrib/amcheck/expected/check_btree.out=20=20=20=20=20=20=20=20=20=20= =20=20|=20=202=20+-=0A=20contrib/amcheck/sql/check_btree.sql=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= contrib/amcheck/verify_nbtree.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20|=20=202=20+-=0A=20doc/src/sgml/maintenance.sgml=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20= +-=0A=20doc/src/sgml/meson.build=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/access/gin/ginbtree.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20|=20=202=20+-=0A=20src/backend/access/heap/pruneheap.c=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=206=20+++---=0A=20= src/backend/access/nbtree/nbtutils.c=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=204=20++--=0A=20src/backend/access/rmgrdesc/xactdesc.c=20=20= =20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/catalog/pg_constraint.c=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20|=20=202=20+-=0A=20src/backend/catalog/system_functions.sql=20= =20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/commands/amcmds.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/commands/copyfrom.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20|=20=202=20+-=0A=20src/backend/commands/tablecmds.c=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=209=20= +++++----=0A=20src/backend/commands/vacuumparallel.c=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/executor/execExpr.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/optimizer/path/equivclass.c=20=20=20=20=20=20=20=20=20=20=20=20= =20|=20=202=20+-=0A=20src/backend/optimizer/path/pathkeys.c=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/optimizer/prep/prepunion.c=20=20=20=20=20=20=20=20=20=20=20=20= =20=20|=20=203=20++-=0A=20src/backend/parser/parse_jsontable.c=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/parser/parse_utilcmd.c=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20|=20=204=20++--=0A=20= src/backend/partitioning/partbounds.c=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=206=20+++---=0A=20src/backend/partitioning/partprune.c=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/postmaster/launch_backend.c=20=20=20=20=20=20=20=20=20=20=20=20= =20|=20=202=20+-=0A=20src/backend/postmaster/walsummarizer.c=20=20=20=20=20= =20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/replication/logical/slotsync.c=20=20=20=20=20=20=20=20=20=20= |=20=202=20+-=0A=20src/backend/replication/walsender.c=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/statistics/dependencies.c=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=204=20++--=0A=20src/backend/storage/aio/read_stream.c=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=206=20+++---=0A=20= src/backend/storage/buffer/bufmgr.c=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20|=20=202=20+-=0A=20src/backend/storage/lmgr/lock.c=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/storage/lmgr/proc.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/utils/adt/jsonpath_exec.c=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=204=20++--=0A=20src/backend/utils/adt/multirangetypes.c=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/backend/utils/adt/selfuncs.c=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20|=20=202=20+-=0A=20src/backend/utils/mmgr/aset.c=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=204=20= ++--=0A=20src/backend/utils/mmgr/bump.c=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=204=20++--=0A=20= src/backend/utils/mmgr/generation.c=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20|=20=204=20++--=0A=20src/bin/pg_basebackup/bbstreamer_tar.c=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/bin/pg_combinebackup/pg_combinebackup.c=20=20=20=20=20=20=20=20=20|=20= =202=20+-=0A=20src/bin/pg_combinebackup/reconstruct.c=20=20=20=20=20=20=20= =20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/bin/pg_upgrade/t/004_subscription.pl=20=20=20=20=20=20=20=20=20=20=20= =20|=20=202=20+-=0A=20src/common/unicode_category.c=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/include/access/heapam_xlog.h=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20|=2010=20+++++-----=0A=20src/include/access/tableam.h=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20= =202=20+-=0A=20src/include/commands/vacuum.h=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/include/common/hashfn_unstable.h=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=202=20+-=0A=20src/include/lib/radixtree.h=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=208=20= ++++----=0A=20src/include/nodes/pathnodes.h=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/include/nodes/primnodes.h=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=20=202=20+-=0A=20src/include/storage/proc.h=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= |=20=202=20+-=0A=20src/interfaces/libpq/fe-cancel.c=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/interfaces/libpq/fe-secure-openssl.c=20=20=20=20=20=20=20=20=20=20=20= =20|=20=202=20+-=0A=20= src/test/isolation/expected/temp-schema-cleanup.out=20|=20=204=20++--=0A=20= src/test/isolation/specs/temp-schema-cleanup.spec=20=20=20|=20=202=20+-=0A= =20src/test/modules/test_resowner/test_resowner_many.c=20|=20=202=20+-=0A= =20src/test/regress/expected/aggregates.out=20=20=20=20=20=20=20=20=20=20= =20=20|=20=202=20+-=0A=20src/test/regress/expected/copy.out=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=204=20++--=0A=20= src/test/regress/expected/foreign_key.out=20=20=20=20=20=20=20=20=20=20=20= |=20=202=20+-=0A=20src/test/regress/expected/publication.out=20=20=20=20=20= =20=20=20=20=20=20|=20=204=20++--=0A=20= src/test/regress/expected/tsdicts.out=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=202=20+-=0A=20src/test/regress/sql/aggregates.sql=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/test/regress/sql/copy.sql=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=20=204=20++--=0A=20= src/test/regress/sql/foreign_key.sql=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=202=20+-=0A=20src/test/regress/sql/publication.sql=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20|=20=204=20++--=0A=20= src/test/regress/sql/tsdicts.sql=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20|=20=202=20+-=0A=20src/test/subscription/t/004_sync.pl=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= src/test/subscription/t/026_stats.pl=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20|=20=202=20+-=0A=2068=20files=20changed,=2098=20insertions(+),=20= 96=20deletions(-)=0A=0Adiff=20--git=20= a/contrib/amcheck/expected/check_btree.out=20= b/contrib/amcheck/expected/check_btree.out=0Aindex=20= cf8284fe12..e7fb5f5515=20100644=0A---=20= a/contrib/amcheck/expected/check_btree.out=0A+++=20= b/contrib/amcheck/expected/check_btree.out=0A@@=20-2,7=20+2,7=20@@=20= CREATE=20TABLE=20bttest_a(id=20int8);=0A=20CREATE=20TABLE=20bttest_b(id=20= int8);=0A=20CREATE=20TABLE=20bttest_multi(id=20int8,=20data=20int8);=0A=20= CREATE=20TABLE=20delete_test_table=20(a=20bigint,=20b=20bigint,=20c=20= bigint,=20d=20bigint);=0A---=20Stabalize=20tests=0A+--=20Stabilize=20= tests=0A=20ALTER=20TABLE=20bttest_a=20SET=20(autovacuum_enabled=20=3D=20= false);=0A=20ALTER=20TABLE=20bttest_b=20SET=20(autovacuum_enabled=20=3D=20= false);=0A=20ALTER=20TABLE=20bttest_multi=20SET=20(autovacuum_enabled=20= =3D=20false);=0Adiff=20--git=20a/contrib/amcheck/sql/check_btree.sql=20= b/contrib/amcheck/sql/check_btree.sql=0Aindex=2068bd71b064..0793dbfeeb=20= 100644=0A---=20a/contrib/amcheck/sql/check_btree.sql=0A+++=20= b/contrib/amcheck/sql/check_btree.sql=0A@@=20-3,7=20+3,7=20@@=20CREATE=20= TABLE=20bttest_b(id=20int8);=0A=20CREATE=20TABLE=20bttest_multi(id=20= int8,=20data=20int8);=0A=20CREATE=20TABLE=20delete_test_table=20(a=20= bigint,=20b=20bigint,=20c=20bigint,=20d=20bigint);=0A=20=0A---=20= Stabalize=20tests=0A+--=20Stabilize=20tests=0A=20ALTER=20TABLE=20= bttest_a=20SET=20(autovacuum_enabled=20=3D=20false);=0A=20ALTER=20TABLE=20= bttest_b=20SET=20(autovacuum_enabled=20=3D=20false);=0A=20ALTER=20TABLE=20= bttest_multi=20SET=20(autovacuum_enabled=20=3D=20false);=0Adiff=20--git=20= a/contrib/amcheck/verify_nbtree.c=20b/contrib/amcheck/verify_nbtree.c=0A= index=20f71f1854e0..20da4a46ba=20100644=0A---=20= a/contrib/amcheck/verify_nbtree.c=0A+++=20= b/contrib/amcheck/verify_nbtree.c=0A@@=20-3036,7=20+3036,7=20@@=20= bt_normalize_tuple(BtreeCheckState=20*state,=20IndexTuple=20itup)=0A=20=09= =20*=20In=20the=20heap,=20tuples=20may=20contain=20short=20varlena=20= datums=20with=20both=201B=0A=20=09=20*=20header=20and=204B=20headers.=20=20= But=20the=20corresponding=20index=20tuple=20should=20always=0A=20=09=20*=20= have=20such=20varlena's=20with=201B=20headers.=20=20So,=20if=20there=20= is=20a=20short=20varlena=0A-=09=20*=20with=204B=20header,=20we=20need=20= to=20convert=20it=20for=20for=20fingerprinting.=0A+=09=20*=20with=204B=20= header,=20we=20need=20to=20convert=20it=20for=20fingerprinting.=0A=20=09=20= *=0A=20=09=20*=20Note=20that=20we=20rely=20on=20deterministic=20= index_form_tuple()=20TOAST=20compression=0A=20=09=20*=20of=20normalized=20= input.=0Adiff=20--git=20a/doc/src/sgml/maintenance.sgml=20= b/doc/src/sgml/maintenance.sgml=0Aindex=202bfa05b8bc..0be90bdc7e=20= 100644=0A---=20a/doc/src/sgml/maintenance.sgml=0A+++=20= b/doc/src/sgml/maintenance.sgml=0A@@=20-802,7=20+802,7=20@@=20HINT:=20=20= Execute=20a=20database-wide=20VACUUM=20in=20that=20database.=0A=20=20=20=20= =20=0A=20=20=20=20=20=20Similar=20to=20the=20XID=20case,=20if=20= autovacuum=20fails=20to=20clear=20old=20MXIDs=20from=20a=20table,=20the=0A= =20=20=20=20=20=20system=20will=20begin=20to=20emit=20warning=20messages=20= when=20the=20database's=20oldest=20MXIDs=20reach=20forty=0A-=20=20=20=20=20= million=20transactions=20from=20the=20wraparound=20point.=20=20And,=20= just=20as=20an=20the=20XID=20case,=20if=20these=0A+=20=20=20=20=20= million=20transactions=20from=20the=20wraparound=20point.=20=20And,=20= just=20as=20in=20the=20XID=20case,=20if=20these=0A=20=20=20=20=20=20= warnings=20are=20ignored,=20the=20system=20will=20refuse=20to=20generate=20= new=20MXIDs=20once=20there=20are=20fewer=0A=20=20=20=20=20=20than=20= three=20million=20left=20until=20wraparound.=0A=20=20=20=20=20=0A= diff=20--git=20a/doc/src/sgml/meson.build=20b/doc/src/sgml/meson.build=0A= index=203a4b47d387..e418de83a7=20100644=0A---=20= a/doc/src/sgml/meson.build=0A+++=20b/doc/src/sgml/meson.build=0A@@=20= -207,7=20+207,7=20@@=20if=20docs_dep.found()=0A=20=20=20= alias_target('man',=20man)=0A=20=20=20alias_target('install-man',=20= install_doc_man)=0A=20=0A-=20=20#=20built=20and=20installed=20as=20part=20= of=20the=20the=20docs=20target=0A+=20=20#=20built=20and=20installed=20as=20= part=20of=20the=20docs=20target=0A=20=20=20installdocs=20+=3D=20= install_doc_man=0A=20=20=20docs=20+=3D=20man=0A=20endif=0Adiff=20--git=20= a/src/backend/access/gin/ginbtree.c=20= b/src/backend/access/gin/ginbtree.c=0Aindex=2086f938686c..b7a5013896=20= 100644=0A---=20a/src/backend/access/gin/ginbtree.c=0A+++=20= b/src/backend/access/gin/ginbtree.c=0A@@=20-766,7=20+766,7=20@@=20= ginFinishSplit(GinBtree=20btree,=20GinBtreeStack=20*stack,=20bool=20= freestack,=0A=20/*=0A=20=20*=20An=20entry=20point=20to=20= ginFinishSplit()=20that=20is=20used=20when=20we=20stumble=20upon=20an=0A=20= =20*=20existing=20incompletely=20split=20page=20in=20the=20tree,=20as=20= opposed=20to=20completing=20a=0A-=20*=20split=20that=20we=20just=20made=20= outselves.=20The=20difference=20is=20that=20stack->buffer=20may=0A+=20*=20= split=20that=20we=20just=20made=20ourselves.=20The=20difference=20is=20= that=20stack->buffer=20may=0A=20=20*=20be=20merely=20share-locked=20on=20= entry,=20and=20will=20be=20upgraded=20to=20exclusive=20mode.=0A=20=20*=0A= =20=20*=20Note:=20Upgrading=20the=20lock=20momentarily=20releases=20it.=20= Doing=20that=20in=20a=20scan=0Adiff=20--git=20= a/src/backend/access/heap/pruneheap.c=20= b/src/backend/access/heap/pruneheap.c=0Aindex=20d2eecaf7eb..3cdfc5b7f1=20= 100644=0A---=20a/src/backend/access/heap/pruneheap.c=0A+++=20= b/src/backend/access/heap/pruneheap.c=0A@@=20-33,7=20+33,7=20@@=0A=20= typedef=20struct=0A=20{=0A=20=09= /*-------------------------------------------------------=0A-=09=20*=20= Arguments=20passed=20to=20heap_page_and_freeze()=0A+=09=20*=20Arguments=20= passed=20to=20heap_page_prune_and_freeze()=0A=20=09=20= *-------------------------------------------------------=0A=20=09=20*/=0A= =20=0A@@=20-306,7=20+306,7=20@@=20heap_page_prune_opt(Relation=20= relation,=20Buffer=20buffer)=0A=20=20*=20If=20the=20HEAP_PRUNE_FREEZE=20= option=20is=20set,=20we=20will=20also=20freeze=20tuples=20if=20it's=0A=20= =20*=20required=20in=20order=20to=20advance=20relfrozenxid=20/=20= relminmxid,=20or=20if=20it's=0A=20=20*=20considered=20advantageous=20for=20= overall=20system=20performance=20to=20do=20so=20now.=20=20The=0A-=20*=20= 'cutoffs',=20'presult',=20'new_refrozen_xid'=20and=20'new_relmin_mxid'=20= arguments=0A+=20*=20'cutoffs',=20'presult',=20'new_relfrozen_xid'=20and=20= 'new_relmin_mxid'=20arguments=0A=20=20*=20are=20required=20when=20= freezing.=20=20When=20HEAP_PRUNE_FREEZE=20option=20is=20set,=20we=20also=0A= =20=20*=20set=20presult->all_visible=20and=20presult->all_frozen=20on=20= exit,=20to=20indicate=20if=0A=20=20*=20the=20VM=20bits=20can=20be=20set.=20= =20They=20are=20always=20set=20to=20false=20when=20the=0A@@=20-337,7=20= +337,7=20@@=20heap_page_prune_opt(Relation=20relation,=20Buffer=20= buffer)=0A=20=20*=20off_loc=20is=20the=20offset=20location=20required=20= by=20the=20caller=20to=20use=20in=20error=0A=20=20*=20callback.=0A=20=20= *=0A-=20*=20new_relfrozen_xid=20and=20new_relmin_xid=20must=20provided=20= by=20the=20caller=20if=20the=0A+=20*=20new_relfrozen_xid=20and=20= new_relmin_mxid=20must=20provided=20by=20the=20caller=20if=20the=0A=20=20= *=20HEAP_PRUNE_FREEZE=20option=20is=20set.=20=20On=20entry,=20they=20= contain=20the=20oldest=20XID=20and=0A=20=20*=20multi-XID=20seen=20on=20= the=20relation=20so=20far.=20=20They=20will=20be=20updated=20with=20= oldest=0A=20=20*=20values=20present=20on=20the=20page=20after=20pruning.=20= =20After=20processing=20the=20whole=0Adiff=20--git=20= a/src/backend/access/nbtree/nbtutils.c=20= b/src/backend/access/nbtree/nbtutils.c=0Aindex=202eff34c4aa..4a872dce16=20= 100644=0A---=20a/src/backend/access/nbtree/nbtutils.c=0A+++=20= b/src/backend/access/nbtree/nbtutils.c=0A@@=20-1756,7=20+1756,7=20@@=20= _bt_start_prim_scan(IndexScanDesc=20scan,=20ScanDirection=20dir)=0A=20=20= *=0A=20=20*=20(The=20rules=20are=20the=20same=20for=20backwards=20scans,=20= except=20that=20the=20operators=20are=0A=20=20*=20flipped:=20just=20= replace=20the=20precondition's=20>=3D=20operator=20with=20a=20<=3D,=20= and=20the=0A-=20*=20postcondition's=20<=3D=20operator=20with=20with=20a=20= >=3D.=20=20In=20other=20words,=20just=20swap=20the=0A+=20*=20= postcondition's=20<=3D=20operator=20with=20a=20>=3D.=20=20In=20other=20= words,=20just=20swap=20the=0A=20=20*=20precondition=20with=20the=20= postcondition.)=0A=20=20*=0A=20=20*=20We=20also=20deal=20with=20= "advancing"=20non-required=20arrays=20here.=20=20Callers=20whose=0A@@=20= -4126,7=20+4126,7=20@@=20_bt_checkkeys_look_ahead(IndexScanDesc=20scan,=20= BTReadPageState=20*pstate,=0A=20=09else=0A=20=09{=0A=20=09=09/*=0A-=09=09= =20*=20Failure=20--=20"ahead"=20tuple=20is=20too=20far=20ahead=20(we=20= were=20too=20aggresive).=0A+=09=09=20*=20Failure=20--=20"ahead"=20tuple=20= is=20too=20far=20ahead=20(we=20were=20too=20aggressive).=0A=20=09=09=20*=0A= =20=09=09=20*=20Reset=20the=20number=20of=20rechecks,=20and=20= aggressively=20reduce=20the=20target=0A=20=09=09=20*=20distance=20(we're=20= much=20more=20aggressive=20here=20than=20we=20were=20when=20the=0Adiff=20= --git=20a/src/backend/access/rmgrdesc/xactdesc.c=20= b/src/backend/access/rmgrdesc/xactdesc.c=0Aindex=20= 41b842d80e..dccca201e0=20100644=0A---=20= a/src/backend/access/rmgrdesc/xactdesc.c=0A+++=20= b/src/backend/access/rmgrdesc/xactdesc.c=0A@@=20-25,7=20+25,7=20@@=0A=20=20= *=20Parse=20the=20WAL=20format=20of=20an=20xact=20commit=20and=20abort=20= records=20into=20an=20easier=20to=0A=20=20*=20understand=20format.=0A=20=20= *=0A-=20*=20This=20routines=20are=20in=20xactdesc.c=20because=20they're=20= accessed=20in=20backend=20(when=0A+=20*=20These=20routines=20are=20in=20= xactdesc.c=20because=20they're=20accessed=20in=20backend=20(when=0A=20=20= *=20replaying=20WAL)=20and=20frontend=20(pg_waldump)=20code.=20This=20= file=20is=20the=20only=20xact=0A=20=20*=20specific=20one=20shared=20= between=20both.=20They're=20complicated=20enough=20that=0A=20=20*=20= duplication=20would=20be=20bothersome.=0Adiff=20--git=20= a/src/backend/catalog/pg_constraint.c=20= b/src/backend/catalog/pg_constraint.c=0Aindex=20604280d322..fcb742e351=20= 100644=0A---=20a/src/backend/catalog/pg_constraint.c=0A+++=20= b/src/backend/catalog/pg_constraint.c=0A@@=20-1651,7=20+1651,7=20@@=20= DeconstructFkConstraintRow(HeapTuple=20tuple,=20int=20*numfks,=0A=20}=0A=20= =0A=20/*=0A-=20*=20FindFkPeriodOpers=20-=0A+=20*=20FindFKPeriodOpers=20-=0A= =20=20*=0A=20=20*=20Looks=20up=20the=20operator=20oids=20used=20for=20= the=20PERIOD=20part=20of=20a=20temporal=20foreign=20key.=0A=20=20*=20The=20= opclass=20should=20be=20the=20opclass=20of=20that=20PERIOD=20element.=0A= diff=20--git=20a/src/backend/catalog/system_functions.sql=20= b/src/backend/catalog/system_functions.sql=0Aindex=20= fe2bb50f46..ae099e328c=20100644=0A---=20= a/src/backend/catalog/system_functions.sql=0A+++=20= b/src/backend/catalog/system_functions.sql=0A@@=20-5,7=20+5,7=20@@=0A=20=20= *=0A=20=20*=20src/backend/catalog/system_functions.sql=0A=20=20*=0A-=20*=20= This=20file=20redefines=20certain=20built-in=20functions=20that=20it's=20= impractical=0A+=20*=20This=20file=20redefines=20certain=20built-in=20= functions=20that=20are=20impractical=0A=20=20*=20to=20fully=20define=20= in=20pg_proc.dat.=20=20In=20most=20cases=20that's=20because=20they=20use=0A= =20=20*=20SQL-standard=20function=20bodies=20and/or=20default=20= expressions.=20=20The=20node=0A=20=20*=20tree=20representations=20of=20= those=20are=20too=20unreadable,=20platform-dependent,=0Adiff=20--git=20= a/src/backend/commands/amcmds.c=20b/src/backend/commands/amcmds.c=0A= index=2010e386288a..aaa0f9a1dc=20100644=0A---=20= a/src/backend/commands/amcmds.c=0A+++=20b/src/backend/commands/amcmds.c=0A= @@=20-167,7=20+167,7=20@@=20get_index_am_oid(const=20char=20*amname,=20= bool=20missing_ok)=0A=20=0A=20/*=0A=20=20*=20get_table_am_oid=20-=20= given=20an=20access=20method=20name,=20look=20up=20its=20OID=0A-=20*=09=09= and=20verify=20it=20corresponds=20to=20an=20table=20AM.=0A+=20*=09=09and=20= verify=20it=20corresponds=20to=20a=20table=20AM.=0A=20=20*/=0A=20Oid=0A=20= get_table_am_oid(const=20char=20*amname,=20bool=20missing_ok)=0Adiff=20= --git=20a/src/backend/commands/copyfrom.c=20= b/src/backend/commands/copyfrom.c=0Aindex=2006bc14636d..ce4d62e707=20= 100644=0A---=20a/src/backend/commands/copyfrom.c=0A+++=20= b/src/backend/commands/copyfrom.c=0A@@=20-996,7=20+996,7=20@@=20= CopyFrom(CopyFromState=20cstate)=0A=20=09=09=09= cstate->escontext->error_occurred)=0A=20=09=09{=0A=20=09=09=09/*=0A-=09=09= =09=20*=20Soft=20error=20occured,=20skip=20this=20tuple=20and=20deal=20= with=20error=0A+=09=09=09=20*=20Soft=20error=20occurred,=20skip=20this=20= tuple=20and=20deal=20with=20error=0A=20=09=09=09=20*=20information=20= according=20to=20ON_ERROR.=0A=20=09=09=09=20*/=0A=20=09=09=09if=20= (cstate->opts.on_error=20=3D=3D=20COPY_ON_ERROR_IGNORE)=0Adiff=20--git=20= a/src/backend/commands/tablecmds.c=20b/src/backend/commands/tablecmds.c=0A= index=20c33a5a5888..10ae3dc8b9=20100644=0A---=20= a/src/backend/commands/tablecmds.c=0A+++=20= b/src/backend/commands/tablecmds.c=0A@@=20-5687,7=20+5687,7=20@@=20= ATParseTransformCmd(List=20**wqueue,=20AlteredTableInfo=20*tab,=20= Relation=20rel,=0A=20=09=09=09case=20AT_AddIndex:=0A=20=0A=20=09=09=09=09= /*=0A-=09=09=09=09=20*=20A=20primary=20key=20on=20a=20inheritance=20= parent=20needs=20supporting=20NOT=0A+=09=09=09=09=20*=20A=20primary=20= key=20on=20an=20inheritance=20parent=20needs=20supporting=20NOT=0A=20=09=09= =09=09=20*=20NULL=20constraint=20on=20its=20children;=20enqueue=20= commands=20to=20create=0A=20=09=09=09=09=20*=20those=20or=20mark=20them=20= inherited=20if=20they=20already=20exist.=0A=20=09=09=09=09=20*/=0A@@=20= -20220,7=20+20220,7=20@@=20ATExecDetachPartitionFinalize(Relation=20rel,=20= RangeVar=20*name)=0A=20=20*=20DetachAddConstraintIfNeeded=0A=20=20*=09=09= Subroutine=20for=20ATExecDetachPartition.=20=20Create=20a=20constraint=20= that=0A=20=20*=09=09takes=20the=20place=20of=20the=20partition=20= constraint,=20but=20avoid=20creating=0A-=20*=09=09a=20dupe=20if=20an=20= constraint=20already=20exists=20which=20implies=20the=20needed=0A+=20*=09= =09a=20dupe=20if=20a=20constraint=20already=20exists=20which=20implies=20= the=20needed=0A=20=20*=09=09constraint.=0A=20=20*/=0A=20static=20void=0A= @@=20-20875,7=20+20875,8=20@@=20GetAttributeStorage(Oid=20atttypid,=20= const=20char=20*storagemode)=0A=20}=0A=20=0A=20/*=0A-=20*=20Struct=20= with=20context=20of=20new=20partition=20for=20insert=20rows=20from=20= splited=20partition=0A+=20*=20Struct=20with=20context=20of=20new=20= partition=20for=20insert=20rows=20from=20partition=20which=0A+=20*=20has=20= been=20split.=0A=20=20*/=0A=20typedef=20struct=20SplitPartitionContext=0A= =20{=0A@@=20-21465,7=20+21466,7=20@@=20ATExecMergePartitions(List=20= **wqueue,=20AlteredTableInfo=20*tab,=20Relation=20rel,=0A=20=09/*=20= Create=20table=20for=20new=20partition,=20use=20partitioned=20table=20as=20= model.=20*/=0A=20=09if=20(isSameName)=0A=20=09{=0A-=09=09/*=20Create=20= partition=20table=20with=20generated=20temparary=20name.=20*/=0A+=09=09= /*=20Create=20partition=20table=20with=20generated=20temporary=20name.=20= */=0A=20=09=09sprintf(tmpRelName,=20"merge-%u-%X-tmp",=20= RelationGetRelid(rel),=20MyProcPid);=0A=20=09=09mergePartName=20=3D=20= makeRangeVar(get_namespace_name(RelationGetNamespace(rel)),=0A=20=09=09=09= =09=09=09=09=09=09=20tmpRelName,=20-1);=0Adiff=20--git=20= a/src/backend/commands/vacuumparallel.c=20= b/src/backend/commands/vacuumparallel.c=0Aindex=205174a4e975..f26070bff2=20= 100644=0A---=20a/src/backend/commands/vacuumparallel.c=0A+++=20= b/src/backend/commands/vacuumparallel.c=0A@@=20-8,7=20+8,7=20@@=0A=20=20= *=0A=20=20*=20In=20a=20parallel=20vacuum,=20we=20perform=20both=20index=20= bulk=20deletion=20and=20index=20cleanup=0A=20=20*=20with=20parallel=20= worker=20processes.=20=20Individual=20indexes=20are=20processed=20by=20= one=0A-=20*=20vacuum=20process.=20=20ParalleVacuumState=20contains=20= shared=20information=20as=20well=20as=0A+=20*=20vacuum=20process.=20=20= ParallelVacuumState=20contains=20shared=20information=20as=20well=20as=0A= =20=20*=20the=20memory=20space=20for=20storing=20dead=20items=20= allocated=20in=20the=20DSA=20area.=20=20We=0A=20=20*=20launch=20parallel=20= worker=20processes=20at=20the=20start=20of=20parallel=20index=0A=20=20*=20= bulk-deletion=20and=20index=20cleanup=20and=20once=20all=20indexes=20are=20= processed,=20the=0Adiff=20--git=20a/src/backend/executor/execExpr.c=20= b/src/backend/executor/execExpr.c=0Aindex=2079087cc6d6..eb5ac20824=20= 100644=0A---=20a/src/backend/executor/execExpr.c=0A+++=20= b/src/backend/executor/execExpr.c=0A@@=20-4400,7=20+4400,7=20@@=20= ExecInitJsonExpr(JsonExpr=20*jsexpr,=20ExprState=20*state,=0A=20=09/*=0A=20= =09=20*=20Add=20a=20special=20step,=20if=20needed,=20to=20check=20if=20= the=20coercion=20evaluation=20ran=0A=20=09=20*=20into=20an=20error=20but=20= was=20not=20thrown=20because=20the=20ON=20ERROR=20behavior=20is=20not=0A= -=09=20*=20ERROR.=20=20It=20will=20set=20jsesestate->error=20if=20an=20= error=20did=20occur.=0A+=09=20*=20ERROR.=20=20It=20will=20set=20= jsestate->error=20if=20an=20error=20did=20occur.=0A=20=09=20*/=0A=20=09= if=20(jsestate->jump_eval_coercion=20>=3D=200=20&&=20escontext=20!=3D=20= NULL)=0A=20=09{=0Adiff=20--git=20= a/src/backend/optimizer/path/equivclass.c=20= b/src/backend/optimizer/path/equivclass.c=0Aindex=20= a619ff9177..30d5e3cd08=20100644=0A---=20= a/src/backend/optimizer/path/equivclass.c=0A+++=20= b/src/backend/optimizer/path/equivclass.c=0A@@=20-2870,7=20+2870,7=20@@=20= add_child_join_rel_equivalences(PlannerInfo=20*root,=0A=20/*=0A=20=20*=20= add_setop_child_rel_equivalences=0A=20=20*=09=09Add=20equivalence=20= members=20for=20each=20non-resjunk=20target=20in=20'child_tlist'=0A-=20*=09= =09to=20the=20EquivalenceClass=20in=20the=20corresponding=20= setop_pathkey's=20pk_class.=0A+=20*=09=09to=20the=20EquivalenceClass=20= in=20the=20corresponding=20setop_pathkey's=20pk_eclass.=0A=20=20*=0A=20=20= *=20'root'=20is=20the=20PlannerInfo=20belonging=20to=20the=20top-level=20= set=20operation.=0A=20=20*=20'child_rel'=20is=20the=20RelOptInfo=20of=20= the=20child=20relation=20we're=20adding=0Adiff=20--git=20= a/src/backend/optimizer/path/pathkeys.c=20= b/src/backend/optimizer/path/pathkeys.c=0Aindex=201d61881a6b..8b258cbef9=20= 100644=0A---=20a/src/backend/optimizer/path/pathkeys.c=0A+++=20= b/src/backend/optimizer/path/pathkeys.c=0A@@=20-384,7=20+384,7=20@@=20= group_keys_reorder_by_pathkeys(List=20*pathkeys,=20List=20= **group_pathkeys,=0A=20=09=20*=20*group_pathkeys=20containing=20grouping=20= pathkeys=20altogether=20with=20aggregate=0A=20=09=20*=20pathkeys.=20=20= If=20we=20process=20aggregate=20pathkeys=20we=20could=20get=20an=20= invalid=0A=20=09=20*=20result=20of=20get_sortgroupref_clause_noerr(),=20= because=20their=0A-=09=20*=20pathkey->pk_eclass->ec_sortref=20doesn't=20= referece=20query=20targetlist.=20=20So,=0A+=09=20*=20= pathkey->pk_eclass->ec_sortref=20doesn't=20reference=20query=20= targetlist.=20=20So,=0A=20=09=20*=20we=20allocate=20a=20separate=20list=20= of=20pathkeys=20for=20lookups.=0A=20=09=20*/=0A=20=09grouping_pathkeys=20= =3D=20list_copy_head(*group_pathkeys,=20num_groupby_pathkeys);=0Adiff=20= --git=20a/src/backend/optimizer/prep/prepunion.c=20= b/src/backend/optimizer/prep/prepunion.c=0Aindex=20= afcb5c0f0f..3f14e90a45=20100644=0A---=20= a/src/backend/optimizer/prep/prepunion.c=0A+++=20= b/src/backend/optimizer/prep/prepunion.c=0A@@=20-214,7=20+214,8=20@@=20= set_operation_ordered_results_useful(SetOperationStmt=20*setop)=0A=20=20= *=0A=20=20*=20Returns=20a=20RelOptInfo=20for=20the=20subtree,=20as=20= well=20as=20these=20output=20parameters:=0A=20=20*=20*pTargetList:=20= receives=20the=20fully-fledged=20tlist=20for=20the=20subtree's=20top=20= plan=0A-=20*=20*istrivial_tlist:=20true=20iif=20datatypes=20between=20= parent=20and=20child=20match.=0A+=20*=20*istrivial_tlist:=20true=20if,=20= and=20only=20if,=20datatypes=20between=20parent=20and=20child=0A+=20*=20= match.=0A=20=20*=0A=20=20*=20The=20pTargetList=20output=20parameter=20is=20= mostly=20redundant=20with=20the=20pathtarget=0A=20=20*=20of=20the=20= returned=20RelOptInfo,=20but=20for=20the=20moment=20we=20need=20it=20= because=20much=20of=0Adiff=20--git=20= a/src/backend/parser/parse_jsontable.c=20= b/src/backend/parser/parse_jsontable.c=0Aindex=2099d3101f6b..3f620ccb9f=20= 100644=0A---=20a/src/backend/parser/parse_jsontable.c=0A+++=20= b/src/backend/parser/parse_jsontable.c=0A@@=20-70,7=20+70,7=20@@=20= static=20JsonTablePlan=20*makeJsonTableSiblingJoin(JsonTablePlan=20= *lplan,=0A=20=20*=20(jt->context_item)=20and=20the=20column-generating=20= expressions=20(jt->columns)=20to=0A=20=20*=20populate=20= TableFunc.docexpr=20and=20TableFunc.colvalexprs,=20respectively.=20Also,=0A= =20=20*=20the=20PASSING=20values=20(jt->passing)=20are=20transformed=20= and=20added=20into=0A-=20*=20TableFunc.passvalexprs.=0A+=20*=20= TableFunc.passingvalexprs.=0A=20=20*/=0A=20ParseNamespaceItem=20*=0A=20= transformJsonTable(ParseState=20*pstate,=20JsonTable=20*jt)=0Adiff=20= --git=20a/src/backend/parser/parse_utilcmd.c=20= b/src/backend/parser/parse_utilcmd.c=0Aindex=20ceba069905..6f2be56def=20= 100644=0A---=20a/src/backend/parser/parse_utilcmd.c=0A+++=20= b/src/backend/parser/parse_utilcmd.c=0A@@=20-3451,7=20+3451,7=20@@=20= checkPartition(Relation=20rel,=20Oid=20partRelOid)=0A=20=0A=20/*=0A=20=20= *=20transformPartitionCmdForSplit=0A-=20*=09=09Analyze=20the=20ALTER=20= TABLLE=20...=20SPLIT=20PARTITION=20command=0A+=20*=09=09Analyze=20the=20= ALTER=20TABLE=20...=20SPLIT=20PARTITION=20command=0A=20=20*=0A=20=20*=20= For=20each=20new=20partition=20sps->bound=20is=20set=20to=20the=20= transformed=20value=20of=20bound.=0A=20=20*=20Does=20checks=20for=20= bounds=20of=20new=20partitions.=0A@@=20-3490,7=20+3490,7=20@@=20= transformPartitionCmdForSplit(CreateStmtContext=20*cxt,=20PartitionCmd=20= *partcmd)=0A=20=0A=20/*=0A=20=20*=20transformPartitionCmdForMerge=0A-=20= *=09=09Analyze=20the=20ALTER=20TABLLE=20...=20MERGE=20PARTITIONS=20= command=0A+=20*=09=09Analyze=20the=20ALTER=20TABLE=20...=20MERGE=20= PARTITIONS=20command=0A=20=20*=0A=20=20*=20Does=20simple=20checks=20for=20= merged=20partitions.=20Calculates=20bound=20of=20result=0A=20=20*=20= partition.=0Adiff=20--git=20a/src/backend/partitioning/partbounds.c=20= b/src/backend/partitioning/partbounds.c=0Aindex=20c0c49b0a0b..31444f4131=20= 100644=0A---=20a/src/backend/partitioning/partbounds.c=0A+++=20= b/src/backend/partitioning/partbounds.c=0A@@=20-5145,7=20+5145,7=20@@=20= get_partition_bound_spec(Oid=20partOid,=20RangeVar=20*name)=0A=20=20*=20= the=20first=20of=20new=20partitions)=20then=20lower=20bound=20of=20= "spec"=20should=20be=20equal=20(or=0A=20=20*=20greater=20than=20or=20= equal=20in=20case=20defaultPart=3Dtrue)=20to=20lower=20bound=20of=20= split=0A=20=20*=20partition.=20If=20last=3Dtrue=20(this=20means=20that=20= "spec"=20is=20the=20last=20of=20new=0A-=20*=20partitions)=20then=20upper=20= bound=20of=20of=20"spec"=20should=20be=20equal=20(or=20less=20than=20or=0A= +=20*=20partitions)=20then=20upper=20bound=20of=20"spec"=20should=20be=20= equal=20(or=20less=20than=20or=0A=20=20*=20equal=20in=20case=20= defaultPart=3Dtrue)=20to=20upper=20bound=20of=20split=20partition.=0A=20=20= *=0A=20=20*=20parent:=09=09=09partitioned=20table=0A@@=20-5244,8=20= +5244,8=20@@=20check_partition_bounds_for_split_range(Relation=20parent,=0A= =20=09=09=09=09=09=09=09=09=09=09=20=20false,=20split_upper);=0A=20=0A=20= =09=09=09/*=0A-=09=09=09=20*=20Upper=20bound=20of=20of=20"spec"=20should=20= be=20equal=20(or=20less=20than=20or=20equal=0A-=09=09=09=20*=20in=20case=20= defaultPart=3Dtrue)=20to=20upper=20bound=20of=20split=20partition.=0A+=09= =09=09=20*=20Upper=20bound=20of=20"spec"=20should=20be=20equal=20(or=20= less=20than=20or=20equal=20in=0A+=09=09=09=20*=20case=20= defaultPart=3Dtrue)=20to=20upper=20bound=20of=20split=20partition.=0A=20=09= =09=09=20*/=0A=20=09=09=09if=20((!defaultPart=20&&=20cmpval)=20||=20= (defaultPart=20&&=20cmpval=20>=200))=0A=20=09=09=09=09overlap=20=3D=20= true;=0Adiff=20--git=20a/src/backend/partitioning/partprune.c=20= b/src/backend/partitioning/partprune.c=0Aindex=209006afd9d2..9a1a7faac7=20= 100644=0A---=20a/src/backend/partitioning/partprune.c=0A+++=20= b/src/backend/partitioning/partprune.c=0A@@=20-1825,7=20+1825,7=20@@=20= match_clause_to_partition_key(GeneratePruningStepsContext=20*context,=0A=20= =09=09=09BooleanTest=20*new_booltest=20=3D=20(BooleanTest=20*)=20= copyObject(clause);=0A=20=09=09=09NullTest=20=20=20*nulltest;=0A=20=0A-=09= =09=09/*=20We=20expect=20'noteq'=20to=20only=20be=20set=20to=20true=20= for=20BooleanTests=20*/=0A+=09=09=09/*=20We=20expect=20'notclause'=20to=20= only=20be=20set=20to=20true=20for=20BooleanTests=20*/=0A=20=09=09=09= Assert(IsA(clause,=20BooleanTest));=0A=20=0A=20=09=09=09/*=20reverse=20= the=20bool=20test=20*/=0Adiff=20--git=20= a/src/backend/postmaster/launch_backend.c=20= b/src/backend/postmaster/launch_backend.c=0Aindex=20= cb0c3e2f8a..4e9dde1517=20100644=0A---=20= a/src/backend/postmaster/launch_backend.c=0A+++=20= b/src/backend/postmaster/launch_backend.c=0A@@=20-187,7=20+187,7=20@@=20= child_process_kind=20child_process_kinds[]=20=3D=20{=0A=20=09/*=0A=20=09=20= *=20WAL=20senders=20start=20their=20life=20as=20regular=20backend=20= processes,=20and=20change=0A=20=09=20*=20their=20type=20after=20= authenticating=20the=20client=20for=20replication.=20=20We=20list=20it=0A= -=09=20*=20here=20forPostmasterChildName()=20but=20cannot=20launch=20= them=20directly.=0A+=09=20*=20here=20for=20PostmasterChildName()=20but=20= cannot=20launch=20them=20directly.=0A=20=09=20*/=0A=20=09[B_WAL_SENDER]=20= =3D=20{"wal=20sender",=20NULL,=20true},=0A=20=09[B_SLOTSYNC_WORKER]=20=3D=20= {"slot=20sync=20worker",=20ReplSlotSyncWorkerMain,=20true},=0Adiff=20= --git=20a/src/backend/postmaster/walsummarizer.c=20= b/src/backend/postmaster/walsummarizer.c=0Aindex=20= 0cd5080fa7..72f6c04478=20100644=0A---=20= a/src/backend/postmaster/walsummarizer.c=0A+++=20= b/src/backend/postmaster/walsummarizer.c=0A@@=20-108,7=20+108,7=20@@=20= static=20WalSummarizerData=20*WalSummarizerCtl;=0A=20=0A=20/*=0A=20=20*=20= When=20we=20reach=20end=20of=20WAL=20and=20need=20to=20read=20more,=20we=20= sleep=20for=20a=20number=20of=0A-=20*=20milliseconds=20that=20is=20a=20= integer=20multiple=20of=20MS_PER_SLEEP_QUANTUM.=20This=20is=0A+=20*=20= milliseconds=20that=20is=20an=20integer=20multiple=20of=20= MS_PER_SLEEP_QUANTUM.=20This=20is=0A=20=20*=20the=20multiplier.=20It=20= should=20vary=20between=201=20and=20MAX_SLEEP_QUANTA,=20depending=0A=20=20= *=20on=20system=20activity.=20See=20summarizer_wait_for_wal()=20for=20= how=20we=20adjust=20this.=0A=20=20*/=0Adiff=20--git=20= a/src/backend/replication/logical/slotsync.c=20= b/src/backend/replication/logical/slotsync.c=0Aindex=20= bda0de52db..cb39adcd0e=20100644=0A---=20= a/src/backend/replication/logical/slotsync.c=0A+++=20= b/src/backend/replication/logical/slotsync.c=0A@@=20-88,7=20+88,7=20@@=0A= =20=20*=20overwrites.=0A=20=20*=0A=20=20*=20The=20'last_start_time'=20is=20= needed=20by=20postmaster=20to=20start=20the=20slot=20sync=20worker=0A-=20= *=20once=20per=20SLOTSYNC_RESTART_INTERVAL_SEC.=20In=20cases=20where=20a=20= immediate=20restart=0A+=20*=20once=20per=20= SLOTSYNC_RESTART_INTERVAL_SEC.=20In=20cases=20where=20an=20immediate=20= restart=0A=20=20*=20is=20expected=20(e.g.,=20slot=20sync=20GUCs=20= change),=20slot=20sync=20worker=20will=20reset=0A=20=20*=20= last_start_time=20before=20exiting,=20so=20that=20postmaster=20can=20= start=20the=20worker=0A=20=20*=20without=20waiting=20for=20= SLOTSYNC_RESTART_INTERVAL_SEC.=0Adiff=20--git=20= a/src/backend/replication/walsender.c=20= b/src/backend/replication/walsender.c=0Aindex=20bc40c454de..9bf7c67f37=20= 100644=0A---=20a/src/backend/replication/walsender.c=0A+++=20= b/src/backend/replication/walsender.c=0A@@=20-3493,7=20+3493,7=20@@=20= WalSndDone(WalSndSendDataCallback=20send_data)=0A=20=20*=20Returns=20the=20= latest=20point=20in=20WAL=20that=20has=20been=20safely=20flushed=20to=20= disk.=0A=20=20*=20This=20should=20only=20be=20called=20when=20in=20= recovery.=0A=20=20*=0A-=20*=20This=20is=20called=20either=20by=20= cascading=20walsender=20to=20find=20WAL=20postion=20to=20be=20sent=0A+=20= *=20This=20is=20called=20either=20by=20cascading=20walsender=20to=20find=20= WAL=20position=20to=20be=20sent=0A=20=20*=20to=20a=20cascaded=20standby=20= or=20by=20slot=20synchronization=20operation=20to=20validate=20remote=0A=20= =20*=20slot's=20lsn=20before=20syncing=20it=20locally.=0A=20=20*=0Adiff=20= --git=20a/src/backend/statistics/dependencies.c=20= b/src/backend/statistics/dependencies.c=0Aindex=205eda06839e..8d01a93b30=20= 100644=0A---=20a/src/backend/statistics/dependencies.c=0A+++=20= b/src/backend/statistics/dependencies.c=0A@@=20-794,7=20+794,7=20@@=20= dependency_is_compatible_clause(Node=20*clause,=20Index=20relid,=20= AttrNumber=20*attnum)=0A=20=09}=0A=20=09else=20if=20(IsA(clause,=20= ScalarArrayOpExpr))=0A=20=09{=0A-=09=09/*=20If=20it's=20an=20scalar=20= array=20operator,=20check=20for=20Var=20IN=20Const.=20*/=0A+=09=09/*=20= If=20it's=20a=20scalar=20array=20operator,=20check=20for=20Var=20IN=20= Const.=20*/=0A=20=09=09ScalarArrayOpExpr=20*expr=20=3D=20= (ScalarArrayOpExpr=20*)=20clause;=0A=20=0A=20=09=09/*=0A@@=20-1222,7=20= +1222,7=20@@=20dependency_is_compatible_expression(Node=20*clause,=20= Index=20relid,=20List=20*statlist,=20N=0A=20=09}=0A=20=09else=20if=20= (IsA(clause,=20ScalarArrayOpExpr))=0A=20=09{=0A-=09=09/*=20If=20it's=20= an=20scalar=20array=20operator,=20check=20for=20Var=20IN=20Const.=20*/=0A= +=09=09/*=20If=20it's=20a=20scalar=20array=20operator,=20check=20for=20= Var=20IN=20Const.=20*/=0A=20=09=09ScalarArrayOpExpr=20*expr=20=3D=20= (ScalarArrayOpExpr=20*)=20clause;=0A=20=0A=20=09=09/*=0Adiff=20--git=20= a/src/backend/storage/aio/read_stream.c=20= b/src/backend/storage/aio/read_stream.c=0Aindex=20f54dacdd91..634cf4f0d1=20= 100644=0A---=20a/src/backend/storage/aio/read_stream.c=0A+++=20= b/src/backend/storage/aio/read_stream.c=0A@@=20-541,9=20+541,9=20@@=20= read_stream_begin_relation(int=20flags,=0A=20=09=09stream->distance=20=3D=20= 1;=0A=20=0A=20=09/*=0A-=09=20*=20Since=20we=20always=20always=20access=20= the=20same=20relation,=20we=20can=20initialize=0A-=09=20*=20parts=20of=20= the=20ReadBuffersOperation=20objects=20and=20leave=20them=20that=20way,=20= to=0A-=09=20*=20avoid=20wasting=20CPU=20cycles=20writing=20to=20them=20= for=20each=20read.=0A+=09=20*=20Since=20we=20always=20access=20the=20= same=20relation,=20we=20can=20initialize=20parts=20of=0A+=09=20*=20the=20= ReadBuffersOperation=20objects=20and=20leave=20them=20that=20way,=20to=20= avoid=0A+=09=20*=20wasting=20CPU=20cycles=20writing=20to=20them=20for=20= each=20read.=0A=20=09=20*/=0A=20=09for=20(int=20i=20=3D=200;=20i=20<=20= max_ios;=20++i)=0A=20=09{=0Adiff=20--git=20= a/src/backend/storage/buffer/bufmgr.c=20= b/src/backend/storage/buffer/bufmgr.c=0Aindex=20901b7230fb..49637284f9=20= 100644=0A---=20a/src/backend/storage/buffer/bufmgr.c=0A+++=20= b/src/backend/storage/buffer/bufmgr.c=0A@@=20-1073,7=20+1073,7=20@@=20= PinBufferForBlock(Relation=20rel,=0A=20=0A=20=09/*=0A=20=09=20*=20If=20= there=20is=20no=20Relation=20it=20usually=20implies=20recovery=20and=20= thus=20permanent,=0A-=09=20*=20but=20we=20take=20an=20argmument=20= because=20CreateAndCopyRelationData=20can=20reach=20us=0A+=09=20*=20but=20= we=20take=20an=20argument=20because=20CreateAndCopyRelationData=20can=20= reach=20us=0A=20=09=20*=20with=20only=20an=20SMgrRelation=20for=20an=20= unlogged=20relation=20that=20we=20don't=20want=0A=20=09=20*=20to=20flag=20= with=20BM_PERMANENT.=0A=20=09=20*/=0Adiff=20--git=20= a/src/backend/storage/lmgr/lock.c=20b/src/backend/storage/lmgr/lock.c=0A= index=205022a50dd7..5154353c84=20100644=0A---=20= a/src/backend/storage/lmgr/lock.c=0A+++=20= b/src/backend/storage/lmgr/lock.c=0A@@=20-1032,7=20+1032,7=20@@=20= LockAcquireExtended(const=20LOCKTAG=20*locktag,=0A=20=0A=20=09=09/*=0A=20= =09=09=20*=20Sleep=20till=20someone=20wakes=20me=20up.=20We=20do=20this=20= even=20in=20the=20dontWait=0A-=09=09=20*=20case,=20beause=20while=20= trying=20to=20go=20to=20sleep,=20we=20may=20discover=20that=20we=0A+=09=09= =20*=20case,=20because=20while=20trying=20to=20go=20to=20sleep,=20we=20= may=20discover=20that=20we=0A=20=09=09=20*=20can=20acquire=20the=20lock=20= immediately=20after=20all.=0A=20=09=09=20*/=0A=20=0Adiff=20--git=20= a/src/backend/storage/lmgr/proc.c=20b/src/backend/storage/lmgr/proc.c=0A= index=20162b1f919d..e4f256c63c=20100644=0A---=20= a/src/backend/storage/lmgr/proc.c=0A+++=20= b/src/backend/storage/lmgr/proc.c=0A@@=20-1047,7=20+1047,7=20@@=20= AuxiliaryPidGetProc(int=20pid)=0A=20=20*=20called,=20because=20it=20= could=20be=20that=20when=20we=20try=20to=20find=20a=20position=20at=20= which=0A=20=20*=20to=20insert=20ourself=20into=20the=20wait=20queue,=20= we=20discover=20that=20we=20must=20be=20inserted=0A=20=20*=20ahead=20of=20= everyone=20who=20wants=20a=20lock=20that=20conflict=20with=20ours.=20In=20= that=20case,=0A-=20*=20we=20get=20the=20lock=20immediately.=20Beause=20= of=20this,=20it's=20sensible=20for=20this=20function=0A+=20*=20we=20get=20= the=20lock=20immediately.=20Because=20of=20this,=20it's=20sensible=20for=20= this=20function=0A=20=20*=20to=20have=20a=20dontWait=20argument,=20= despite=20the=20name.=0A=20=20*=0A=20=20*=20The=20lock=20table's=20= partition=20lock=20must=20be=20held=20at=20entry,=20and=20will=20be=20= held=0Adiff=20--git=20a/src/backend/utils/adt/jsonpath_exec.c=20= b/src/backend/utils/adt/jsonpath_exec.c=0Aindex=20103572ed93..ad6a5369d9=20= 100644=0A---=20a/src/backend/utils/adt/jsonpath_exec.c=0A+++=20= b/src/backend/utils/adt/jsonpath_exec.c=0A@@=20-4200,7=20+4200,7=20@@=20= JsonTableSetDocument(TableFuncScanState=20*state,=20Datum=20value)=0A=20= }=0A=20=0A=20/*=0A-=20*=20Evaluate=20a=20JsonTablePlan's=20jsonpath=20to=20= get=20a=20new=20row=20pattren=20from=0A+=20*=20Evaluate=20a=20= JsonTablePlan's=20jsonpath=20to=20get=20a=20new=20row=20pattern=20from=0A= =20=20*=20the=20given=20context=20item=0A=20=20*/=0A=20static=20void=0A= @@=20-4318,7=20+4318,7=20@@=20= JsonTablePlanScanNextRow(JsonTablePlanState=20*planstate)=0A=20=09=09/*=0A= =20=09=09=20*=20Now=20fetch=20the=20nested=20plan's=20current=20row=20to=20= be=20joined=20against=20the=0A=20=09=09=20*=20parent=20row.=20=20Any=20= further=20nested=20plans'=20paths=20will=20be=20re-evaluated=0A-=09=09=20= *=20reursively,=20level=20at=20a=20time,=20after=20setting=20each=20= nested=20plan's=0A+=09=09=20*=20recursively,=20level=20at=20a=20time,=20= after=20setting=20each=20nested=20plan's=0A=20=09=09=20*=20current=20= row.=0A=20=09=09=20*/=0A=20=09=09(void)=20= JsonTablePlanNextRow(planstate->nested);=0Adiff=20--git=20= a/src/backend/utils/adt/multirangetypes.c=20= b/src/backend/utils/adt/multirangetypes.c=0Aindex=20= 8f12c953ca..558c6c18c3=20100644=0A---=20= a/src/backend/utils/adt/multirangetypes.c=0A+++=20= b/src/backend/utils/adt/multirangetypes.c=0A@@=20-330,7=20+330,7=20@@=20= multirange_out(PG_FUNCTION_ARGS)=0A=20}=0A=20=0A=20/*=0A-=20*=20Binary=20= representation:=20First=20a=20int32-sized=20count=20of=20ranges,=20= followed=20by=0A+=20*=20Binary=20representation:=20First=20an=20= int32-sized=20count=20of=20ranges,=20followed=20by=0A=20=20*=20ranges=20= in=20their=20native=20binary=20representation.=0A=20=20*/=0A=20Datum=0A= diff=20--git=20a/src/backend/utils/adt/selfuncs.c=20= b/src/backend/utils/adt/selfuncs.c=0Aindex=2035f8f306ee..5f5d7959d8=20= 100644=0A---=20a/src/backend/utils/adt/selfuncs.c=0A+++=20= b/src/backend/utils/adt/selfuncs.c=0A@@=20-6968,7=20+6968,7=20@@=20= btcostestimate(PlannerInfo=20*root,=20IndexPath=20*path,=20double=20= loop_count,=0A=20=09=09=20*=20btree=20scans,=20making=20the=20top-level=20= scan=20look=20like=20a=20continuous=20scan=0A=20=09=09=20*=20(as=20= opposed=20to=20num_sa_scans-many=20primitive=20index=20scans).=20=20= After=0A=20=09=09=20*=20all,=20btree=20scans=20mostly=20work=20like=20= that=20at=20runtime.=20=20However,=20such=20a=0A-=09=09=20*=20scheme=20= would=20badly=20bias=20genericcostestimate's=20simplistic=20appraoch=0A+=09= =09=20*=20scheme=20would=20badly=20bias=20genericcostestimate's=20= simplistic=20approach=0A=20=09=09=20*=20to=20calculating=20numIndexPages=20= through=20prorating.=0A=20=09=09=20*=0A=20=09=09=20*=20Stick=20with=20= the=20approach=20taken=20by=20non-native=20SAOP=20scans=20for=20now.=0A= diff=20--git=20a/src/backend/utils/mmgr/aset.c=20= b/src/backend/utils/mmgr/aset.c=0Aindex=20751cc3408c..dede30dd86=20= 100644=0A---=20a/src/backend/utils/mmgr/aset.c=0A+++=20= b/src/backend/utils/mmgr/aset.c=0A@@=20-979,8=20+979,8=20@@=20= AllocSetAlloc(MemoryContext=20context,=20Size=20size,=20int=20flags)=0A=20= =09Assert(set->blocks=20!=3D=20NULL);=0A=20=0A=20=09/*=0A-=09=20*=20If=20= requested=20size=20exceeds=20maximum=20for=20chunks=20we=20hand=20the=20= the=20request=0A-=09=20*=20off=20to=20AllocSetAllocLarge().=0A+=09=20*=20= If=20requested=20size=20exceeds=20maximum=20for=20chunks=20we=20hand=20= the=20request=20off=20to=0A+=09=20*=20AllocSetAllocLarge().=0A=20=09=20= */=0A=20=09if=20(size=20>=20set->allocChunkLimit)=0A=20=09=09return=20= AllocSetAllocLarge(context,=20size,=20flags);=0Adiff=20--git=20= a/src/backend/utils/mmgr/bump.c=20b/src/backend/utils/mmgr/bump.c=0A= index=20449bd29344..26d2907fb7=20100644=0A---=20= a/src/backend/utils/mmgr/bump.c=0A+++=20b/src/backend/utils/mmgr/bump.c=0A= @@=20-501,8=20+501,8=20@@=20BumpAlloc(MemoryContext=20context,=20Size=20= size,=20int=20flags)=0A=20#endif=0A=20=0A=20=09/*=0A-=09=20*=20If=20= requested=20size=20exceeds=20maximum=20for=20chunks=20we=20hand=20the=20= the=20request=0A-=09=20*=20off=20to=20BumpAllocLarge().=0A+=09=20*=20If=20= requested=20size=20exceeds=20maximum=20for=20chunks=20we=20hand=20the=20= request=20off=20to=0A+=09=20*=20BumpAllocLarge().=0A=20=09=20*/=0A=20=09= if=20(chunk_size=20>=20set->allocChunkLimit)=0A=20=09=09return=20= BumpAllocLarge(context,=20size,=20flags);=0Adiff=20--git=20= a/src/backend/utils/mmgr/generation.c=20= b/src/backend/utils/mmgr/generation.c=0Aindex=205d81af1f94..b858b8d0f7=20= 100644=0A---=20a/src/backend/utils/mmgr/generation.c=0A+++=20= b/src/backend/utils/mmgr/generation.c=0A@@=20-541,8=20+541,8=20@@=20= GenerationAlloc(MemoryContext=20context,=20Size=20size,=20int=20flags)=0A= =20#endif=0A=20=0A=20=09/*=0A-=09=20*=20If=20requested=20size=20exceeds=20= maximum=20for=20chunks=20we=20hand=20the=20the=20request=0A-=09=20*=20= off=20to=20GenerationAllocLarge().=0A+=09=20*=20If=20requested=20size=20= exceeds=20maximum=20for=20chunks=20we=20hand=20the=20request=20off=20to=0A= +=09=20*=20GenerationAllocLarge().=0A=20=09=20*/=0A=20=09if=20= (chunk_size=20>=20set->allocChunkLimit)=0A=20=09=09return=20= GenerationAllocLarge(context,=20size,=20flags);=0Adiff=20--git=20= a/src/bin/pg_basebackup/bbstreamer_tar.c=20= b/src/bin/pg_basebackup/bbstreamer_tar.c=0Aindex=20= a778e620cc..dec71ea65b=20100644=0A---=20= a/src/bin/pg_basebackup/bbstreamer_tar.c=0A+++=20= b/src/bin/pg_basebackup/bbstreamer_tar.c=0A@@=20-345,7=20+345,7=20@@=20= bbstreamer_tar_parser_free(bbstreamer=20*streamer)=0A=20}=0A=20=0A=20/*=0A= -=20*=20Create=20an=20bbstreamer=20that=20can=20generate=20a=20tar=20= archive.=0A+=20*=20Create=20a=20bbstreamer=20that=20can=20generate=20a=20= tar=20archive.=0A=20=20*=0A=20=20*=20This=20is=20intended=20to=20be=20= usable=20either=20for=20generating=20a=20brand-new=20tar=20archive=0A=20=20= *=20or=20for=20modifying=20one=20on=20the=20fly.=20The=20input=20should=20= be=20a=20series=20of=20typed=0Adiff=20--git=20= a/src/bin/pg_combinebackup/pg_combinebackup.c=20= b/src/bin/pg_combinebackup/pg_combinebackup.c=0Aindex=20= 2788c78fdd..08ef397a67=20100644=0A---=20= a/src/bin/pg_combinebackup/pg_combinebackup.c=0A+++=20= b/src/bin/pg_combinebackup/pg_combinebackup.c=0A@@=20-1156,7=20+1156,7=20= @@=20remember_to_cleanup_directory(char=20*target_path,=20bool=20= rmtopdir)=0A=20}=0A=20=0A=20/*=0A-=20*=20Empty=20out=20the=20list=20of=20= directories=20scheduled=20for=20cleanup=20a=20exit.=0A+=20*=20Empty=20= out=20the=20list=20of=20directories=20scheduled=20for=20cleanup=20at=20= exit.=0A=20=20*=0A=20=20*=20We=20want=20to=20remove=20the=20output=20= directories=20only=20on=20a=20failure,=20so=20call=20this=0A=20=20*=20= function=20when=20we=20know=20that=20the=20operation=20has=20succeeded.=0A= diff=20--git=20a/src/bin/pg_combinebackup/reconstruct.c=20= b/src/bin/pg_combinebackup/reconstruct.c=0Aindex=20= 15f62c18df..d481a5c565=20100644=0A---=20= a/src/bin/pg_combinebackup/reconstruct.c=0A+++=20= b/src/bin/pg_combinebackup/reconstruct.c=0A@@=20-756,7=20+756,7=20@@=20= write_block(int=20fd,=20char=20*output_filename,=0A=20}=0A=20=0A=20/*=0A= -=20*=20Read=20a=20block=20of=20data=20(BLCKSZ=20bytes)=20into=20the=20= the=20buffer.=0A+=20*=20Read=20a=20block=20of=20data=20(BLCKSZ=20bytes)=20= into=20the=20buffer.=0A=20=20*/=0A=20static=20void=0A=20read_block(rfile=20= *s,=20off_t=20off,=20uint8=20*buffer)=0Adiff=20--git=20= a/src/bin/pg_upgrade/t/004_subscription.pl=20= b/src/bin/pg_upgrade/t/004_subscription.pl=0Aindex=20= 48918e8c29..a038928fe7=20100644=0A---=20= a/src/bin/pg_upgrade/t/004_subscription.pl=0A+++=20= b/src/bin/pg_upgrade/t/004_subscription.pl=0A@@=20-241,7=20+241,7=20@@=20= my=20$tab_upgraded2_oid=20=3D=20$old_sub->safe_psql('postgres',=0A=20=0A=20= $old_sub->stop;=0A=20=0A-#=20Change=20configuration=20so=20that=20= initial=20table=20sync=20sync=20does=20not=20get=20started=0A+#=20Change=20= configuration=20so=20that=20initial=20table=20sync=20does=20not=20get=20= started=0A=20#=20automatically=0A=20= $new_sub->append_conf('postgresql.conf',=0A=20=09= "max_logical_replication_workers=20=3D=200");=0Adiff=20--git=20= a/src/common/unicode_category.c=20b/src/common/unicode_category.c=0A= index=20bece7334f5..359e82ec31=20100644=0A---=20= a/src/common/unicode_category.c=0A+++=20b/src/common/unicode_category.c=0A= @@=20-23,7=20+23,7=20@@=0A=20/*=0A=20=20*=20Create=20bitmasks=20from=20= pg_unicode_category=20values=20for=20efficient=20comparison=20of=0A=20=20= *=20multiple=20categories.=20For=20instance,=20PG_U_MN_MASK=20is=20a=20= bitmask=20representing=0A-=20*=20the=20general=20cateogry=20Mn;=20and=20= PG_U_M_MASK=20represents=20general=20categories=20Mn,=0A+=20*=20the=20= general=20category=20Mn;=20and=20PG_U_M_MASK=20represents=20general=20= categories=20Mn,=0A=20=20*=20Me,=20and=20Mc.=0A=20=20*=0A=20=20*=20The=20= number=20of=20Unicode=20General=20Categories=20should=20never=20grow,=20= so=20a=2032-bit=0Adiff=20--git=20a/src/include/access/heapam_xlog.h=20= b/src/include/access/heapam_xlog.h=0Aindex=20551a0370aa..22a1747c4d=20= 100644=0A---=20a/src/include/access/heapam_xlog.h=0A+++=20= b/src/include/access/heapam_xlog.h=0A@@=20-287,7=20+287,7=20@@=20typedef=20= struct=20xl_heap_prune=0A=20=09uint8=09=09flags;=0A=20=0A=20=09/*=0A-=09=20= *=20If=20XLHP_HAS_CONFLICT_HORIZON=20is=20set,=20the=20conflict=20= horzion=20XID=20follows,=0A+=09=20*=20If=20XLHP_HAS_CONFLICT_HORIZON=20= is=20set,=20the=20conflict=20horizon=20XID=20follows,=0A=20=09=20*=20= unaligned=0A=20=09=20*/=0A=20}=20xl_heap_prune;=0A@@=20-322,7=20+322,7=20= @@=20typedef=20struct=20xl_heap_prune=0A=20#define=09=09= XLHP_HAS_FREEZE_PLANS=09=09(1=20<<=204)=0A=20=0A=20/*=0A-=20*=20= XLHP_HAS_REDIRECTIONS,=20XLHP_HAS_DEAD_ITEMS,=20and=20= XLHP_HAS_NOW_UNUSED=0A+=20*=20XLHP_HAS_REDIRECTIONS,=20= XLHP_HAS_DEAD_ITEMS,=20and=20XLHP_HAS_NOW_UNUSED_ITEMS=0A=20=20*=20= indicate=20that=20xlhp_prune_items=20sub-records=20with=20redirected,=20= dead,=20and=0A=20=20*=20unused=20item=20offsets=20are=20present.=0A=20=20= */=0A@@=20-354,9=20+354,9=20@@=20typedef=20struct=20xlhp_freeze_plan=0A=20= =20*=0A=20=20*=20The=20backup=20block's=20data=20contains=20an=20array=20= of=20xlhp_freeze_plan=20structs=20(with=0A=20=20*=20nplans=20elements).=20= =20The=20individual=20item=20offsets=20are=20located=20in=20an=20array=20= at=0A-=20*=20the=20end=20of=20the=20entire=20record=20with=20with=20= nplans=20*=20(each=20plan's=20ntuples)=0A-=20*=20members.=20=20Those=20= offsets=20are=20in=20the=20same=20order=20as=20the=20plans.=20=20The=20= REDO=0A-=20*=20routine=20uses=20the=20offsets=20to=20freeze=20the=20= corresponding=20heap=20tuples.=0A+=20*=20the=20end=20of=20the=20entire=20= record=20with=20nplans=20*=20(each=20plan's=20ntuples)=20members=0A+=20*=20= Those=20offsets=20are=20in=20the=20same=20order=20as=20the=20plans.=20=20= The=20REDO=20routine=20uses=0A+=20*=20the=20offsets=20to=20freeze=20the=20= corresponding=20heap=20tuples.=0A=20=20*=0A=20=20*=20(As=20of=20= PostgreSQL=2017,=20XLOG_HEAP2_PRUNE_VACUUM_SCAN=20records=20replace=20= the=0A=20=20*=20separate=20XLOG_HEAP2_FREEZE_PAGE=20records.)=0Adiff=20= --git=20a/src/include/access/tableam.h=20b/src/include/access/tableam.h=0A= index=201cc395317e..d61cc0d48d=20100644=0A---=20= a/src/include/access/tableam.h=0A+++=20b/src/include/access/tableam.h=0A= @@=20-1788,7=20+1788,7=20@@=20table_index_validate_scan(Relation=20= table_rel,=0A=20}=0A=20=0A=20/*=0A-=20*=20table_relation_analyze=20-=20= fill=20the=20infromation=20for=20a=20sampling=20statistics=0A+=20*=20= table_relation_analyze=20-=20fill=20the=20information=20for=20a=20= sampling=20statistics=0A=20=20*=09=09=09=09=09=09=09acquisition=0A=20=20= *=0A=20=20*=20The=20pointer=20to=20a=20function=20that=20will=20collect=20= sample=20rows=20from=20the=20table=0Adiff=20--git=20= a/src/include/commands/vacuum.h=20b/src/include/commands/vacuum.h=0A= index=2012a03abb75..f28b560119=20100644=0A---=20= a/src/include/commands/vacuum.h=0A+++=20b/src/include/commands/vacuum.h=0A= @@=20-185,7=20+185,7=20@@=20typedef=20struct=20VacAttrStats=0A=20=20*=20= table=20and=20stored=20into=20the=20caller-provided=20`rows`=20array.=20=20= The=20actual=20number=0A=20=20*=20of=20rows=20collected=20must=20be=20= returned.=20=20In=20addition,=20a=20function=20should=20store=0A=20=20*=20= estimates=20of=20the=20total=20numbers=20of=20live=20and=20dead=20rows=20= in=20the=20table=20into=20the=0A-=20*=20output=20parameters=20= `*totalrows`=20and=20`*totaldeadrows1.=20=20(Set=20`*totaldeadrows`=0A+=20= *=20output=20parameters=20`*totalrows`=20and=20`*totaldeadrows.=20=20= (Set=20`*totaldeadrows`=0A=20=20*=20to=20zero=20if=20the=20storage=20= does=20not=20have=20any=20concept=20of=20dead=20rows.)=0A=20=20*/=0A=20= typedef=20int=20(*AcquireSampleRowsFunc)=20(Relation=20relation,=20int=20= elevel,=0Adiff=20--git=20a/src/include/common/hashfn_unstable.h=20= b/src/include/common/hashfn_unstable.h=0Aindex=207b647470ab..0adb0f82f9=20= 100644=0A---=20a/src/include/common/hashfn_unstable.h=0A+++=20= b/src/include/common/hashfn_unstable.h=0A@@=20-73,7=20+73,7=20@@=0A=20=20= *=0A=20=20*=20For=20longer=20or=20variable-length=20input,=20= fasthash_accum()=20is=20a=20more=0A=20=20*=20flexible,=20but=20more=20= verbose=20method.=20The=20standalone=20functions=20use=20this=0A-=20*=20= internally,=20so=20see=20fasthash64()=20for=20an=20an=20example=20of=20= this.=0A+=20*=20internally,=20so=20see=20fasthash64()=20for=20an=20= example=20of=20this.=0A=20=20*=0A=20=20*=20After=20all=20inputs=20have=20= been=20mixed=20in,=20finalize=20the=20hash:=0A=20=20*=0Adiff=20--git=20= a/src/include/lib/radixtree.h=20b/src/include/lib/radixtree.h=0Aindex=20= dc4c00d38a..e780b8d323=20100644=0A---=20a/src/include/lib/radixtree.h=0A= +++=20b/src/include/lib/radixtree.h=0A@@=20-64,7=20+64,7=20@@=0A=20=20*=20= small=20enough.=0A=20=20*=0A=20=20*=20There=20are=20two=20other=20= techniques=20described=20in=20the=20paper=20that=20are=20not=0A-=20*=20= impemented=20here:=0A+=20*=20implemented=20here:=0A=20=20*=20-=20path=20= compression=20"...removes=20all=20inner=20nodes=20that=20have=20only=20a=20= single=20child."=0A=20=20*=20-=20lazy=20path=20expansion=20"...inner=20= nodes=20are=20only=20created=20if=20they=20are=20required=0A=20=20*=20=20= =20to=20distinguish=20at=20least=20two=20leaf=20nodes."=0A@@=20-385,7=20= +385,7=20@@=20typedef=20struct=20RT_NODE=0A=20=0A=20=09/*=0A=20=09=20*=20= Number=20of=20children.=20uint8=20is=20sufficient=20for=20all=20node=20= kinds,=20because=0A-=09=20*=20nodes=20shrink=20when=20this=20number=20= gets=20lower=20than=20some=20thresold.=20Since=0A+=09=20*=20nodes=20= shrink=20when=20this=20number=20gets=20lower=20than=20some=20threshold.=20= Since=0A=20=09=20*=20node256=20cannot=20possibly=20have=20zero=20= children,=20we=20let=20the=20counter=20overflow=0A=20=09=20*=20and=20we=20= interpret=20zero=20as=20"256"=20for=20this=20node=20kind.=0A=20=09=20*/=0A= @@=20-1581,7=20+1581,7=20@@=20RT_EXTEND_UP(RT_RADIX_TREE=20*=20tree,=20= uint64=20key)=0A=20=0A=20=09Assert(shift=20<=20target_shift);=0A=20=0A-=09= /*=20Grow=20tree=20upwards=20until=20start=20shift=20can=20accomodate=20= the=20key=20*/=0A+=09/*=20Grow=20tree=20upwards=20until=20start=20shift=20= can=20accommodate=20the=20key=20*/=0A=20=09while=20(shift=20<=20= target_shift)=0A=20=09{=0A=20=09=09RT_CHILD_PTR=20node;=0A@@=20-1869,7=20= +1869,7=20@@=20RT_CREATE(MemoryContext=20ctx)=0A=20=09=20*/=0A=20=09if=20= (sizeof(RT_VALUE_TYPE)=20>=20sizeof(RT_PTR_ALLOC))=0A=20=09=09= tree->leaf_context=20=3D=20SlabContextCreate(ctx,=0A-=09=09=09=09=09=09=09= =09=09=09=09=20=20=20RT_STR(RT_PREFIX)=20"radix_tree=20leaf=20contex",=0A= +=09=09=09=09=09=09=09=09=09=09=09=20=20=20RT_STR(RT_PREFIX)=20= "radix_tree=20leaf=20context",=0A=20=09=09=09=09=09=09=09=09=09=09=09=20=20= =20RT_SLAB_BLOCK_SIZE(sizeof(RT_VALUE_TYPE)),=0A=20=09=09=09=09=09=09=09=09= =09=09=09=20=20=20sizeof(RT_VALUE_TYPE));=0A=20#endif=09=09=09=09=09=09=09= /*=20!RT_VARLEN_VALUE_SIZE=20*/=0Adiff=20--git=20= a/src/include/nodes/pathnodes.h=20b/src/include/nodes/pathnodes.h=0A= index=206c71098f2d..b8141f141a=20100644=0A---=20= a/src/include/nodes/pathnodes.h=0A+++=20b/src/include/nodes/pathnodes.h=0A= @@=20-2867,7=20+2867,7=20@@=20typedef=20struct=20PlaceHolderVar=0A=20=20= *=20are=20not=20set=20meaningfully=20within=20such=20structs.=0A=20=20*=0A= =20=20*=20We=20also=20create=20transient=20SpecialJoinInfos=20for=20= child=20joins=20during=0A-=20*=20partiotionwise=20join=20planning,=20= which=20are=20also=20not=20present=20in=20join_info_list.=0A+=20*=20= partitionwise=20join=20planning,=20which=20are=20also=20not=20present=20= in=20join_info_list.=0A=20=20*/=0A=20#ifndef=20= HAVE_SPECIALJOININFO_TYPEDEF=0A=20typedef=20struct=20SpecialJoinInfo=20= SpecialJoinInfo;=0Adiff=20--git=20a/src/include/nodes/primnodes.h=20= b/src/include/nodes/primnodes.h=0Aindex=20dafe93a4c9..ab264fdc07=20= 100644=0A---=20a/src/include/nodes/primnodes.h=0A+++=20= b/src/include/nodes/primnodes.h=0A@@=20-1788,7=20+1788,7=20@@=20typedef=20= struct=20JsonExpr=0A=20=09/*=20Format=20of=20the=20above=20expression=20= needed=20by=20ruleutils.c=20*/=0A=20=09JsonFormat=20*format;=0A=20=0A-=09= /*=20jsopath-valued=20expression=20containing=20the=20query=20pattern=20= */=0A+=09/*=20jsonpath-valued=20expression=20containing=20the=20query=20= pattern=20*/=0A=20=09Node=09=20=20=20*path_spec;=0A=20=0A=20=09/*=20= Expected=20type/format=20of=20the=20output.=20*/=0Adiff=20--git=20= a/src/include/storage/proc.h=20b/src/include/storage/proc.h=0Aindex=20= 18891a86fb..9488bf1857=20100644=0A---=20a/src/include/storage/proc.h=0A= +++=20b/src/include/storage/proc.h=0A@@=20-202,7=20+202,7=20@@=20struct=20= PGPROC=0A=20=09=09LocalTransactionId=20lxid;=09/*=20local=20id=20of=20= top-level=20transaction=0A=20=09=09=09=09=09=09=09=09=09=20*=20currently=20= *=20being=20executed=20by=20this=0A=20=09=09=09=09=09=09=09=09=09=20*=20= proc,=20if=20running;=20else=0A-=09=09=09=09=09=09=09=09=09=20*=20= InvalidLocaltransactionId=20*/=0A+=09=09=09=09=09=09=09=09=09=20*=20= InvalidLocalTransactionId=20*/=0A=20=09}=09=09=09vxid;=0A=20=0A=20=09/*=20= These=20fields=20are=20zero=20while=20a=20backend=20is=20still=20= starting=20up:=20*/=0Adiff=20--git=20a/src/interfaces/libpq/fe-cancel.c=20= b/src/interfaces/libpq/fe-cancel.c=0Aindex=20954dce5431..4f00a91b51=20= 100644=0A---=20a/src/interfaces/libpq/fe-cancel.c=0A+++=20= b/src/interfaces/libpq/fe-cancel.c=0A@@=20-210,7=20+210,7=20@@=20= PQcancelPoll(PGcancelConn=20*cancelConn)=0A=20=09int=09=09=09n;=0A=20=0A=20= =09/*=0A-=09=20*=20We=20leave=20most=20of=20the=20=20connection=20= establishement=20to=20PQconnectPoll,=20since=0A+=09=20*=20We=20leave=20= most=20of=20the=20connection=20establishment=20to=20PQconnectPoll,=20= since=0A=20=09=20*=20it's=20very=20similar=20to=20normal=20connection=20= establishment.=20But=20once=20we=20get=0A=20=09=20*=20to=20the=20= CONNECTION_AWAITING_RESPONSE=20we=20need=20to=20start=20doing=20our=20= own=0A=20=09=20*=20thing.=0Adiff=20--git=20= a/src/interfaces/libpq/fe-secure-openssl.c=20= b/src/interfaces/libpq/fe-secure-openssl.c=0Aindex=20= c98cfa6084..e7a4d006e1=20100644=0A---=20= a/src/interfaces/libpq/fe-secure-openssl.c=0A+++=20= b/src/interfaces/libpq/fe-secure-openssl.c=0A@@=20-1655,7=20+1655,7=20@@=20= pgtls_close(PGconn=20*conn)=0A=20=09{=0A=20=09=09/*=0A=20=09=09=20*=20In=20= the=20non-SSL=20case,=20just=20remove=20the=20crypto=20callbacks=20if=20= the=0A-=09=09=20*=20connection=20has=20then=20loaded.=20=20This=20code=20= path=20has=20no=20dependency=20on=0A+=09=09=20*=20connection=20has=20= them=20loaded.=20=20This=20code=20path=20has=20no=20dependency=20on=0A=20= =09=09=20*=20any=20pending=20SSL=20calls.=0A=20=09=09=20*/=0A=20=09=09if=20= (conn->crypto_loaded)=0Adiff=20--git=20= a/src/test/isolation/expected/temp-schema-cleanup.out=20= b/src/test/isolation/expected/temp-schema-cleanup.out=0Aindex=20= 35b91d9e45..d10aee53a8=20100644=0A---=20= a/src/test/isolation/expected/temp-schema-cleanup.out=0A+++=20= b/src/test/isolation/expected/temp-schema-cleanup.out=0A@@=20-9,7=20+9,7=20= @@=20step=20s1_create_temp_objects:=0A=20=20=20=20=20=20=20=20=20CREATE=20= OR=20REPLACE=20FUNCTION=20pg_temp.long()=20RETURNS=20text=20LANGUAGE=20= sql=20AS=20$body$=20SELECT=20%L;=20$body$$outer$,=0A=20=09(SELECT=20= string_agg(g.i::text||':'||random()::text,=20'|')=20FROM=20= generate_series(1,=20100)=20g(i))));=0A=20=0A-=20=20=20=20--=20The=20= above=20bug=20requirs=20function=20removal=20to=20happen=20after=20a=20= catalog=0A+=20=20=20=20--=20The=20above=20bug=20requires=20function=20= removal=20to=20happen=20after=20a=20catalog=0A=20=20=20=20=20--=20= invalidation.=20dependency.c=20sorts=20objects=20in=20descending=20oid=20= order=20so=0A=20=20=20=20=20--=20that=20newer=20objects=20are=20deleted=20= before=20older=20objects,=20so=20create=20a=0A=20=20=20=20=20--=20table=20= after.=0A@@=20-66,7=20+66,7=20@@=20step=20s1_create_temp_objects:=0A=20=20= =20=20=20=20=20=20=20CREATE=20OR=20REPLACE=20FUNCTION=20pg_temp.long()=20= RETURNS=20text=20LANGUAGE=20sql=20AS=20$body$=20SELECT=20%L;=20= $body$$outer$,=0A=20=09(SELECT=20= string_agg(g.i::text||':'||random()::text,=20'|')=20FROM=20= generate_series(1,=20100)=20g(i))));=0A=20=0A-=20=20=20=20--=20The=20= above=20bug=20requirs=20function=20removal=20to=20happen=20after=20a=20= catalog=0A+=20=20=20=20--=20The=20above=20bug=20requires=20function=20= removal=20to=20happen=20after=20a=20catalog=0A=20=20=20=20=20--=20= invalidation.=20dependency.c=20sorts=20objects=20in=20descending=20oid=20= order=20so=0A=20=20=20=20=20--=20that=20newer=20objects=20are=20deleted=20= before=20older=20objects,=20so=20create=20a=0A=20=20=20=20=20--=20table=20= after.=0Adiff=20--git=20= a/src/test/isolation/specs/temp-schema-cleanup.spec=20= b/src/test/isolation/specs/temp-schema-cleanup.spec=0Aindex=20= a9417b7e90..72decba6cb=20100644=0A---=20= a/src/test/isolation/specs/temp-schema-cleanup.spec=0A+++=20= b/src/test/isolation/specs/temp-schema-cleanup.spec=0A@@=20-30,7=20+30,7=20= @@=20step=20s1_create_temp_objects=20{=0A=20=20=20=20=20=20=20=20=20= CREATE=20OR=20REPLACE=20FUNCTION=20pg_temp.long()=20RETURNS=20text=20= LANGUAGE=20sql=20AS=20$body$=20SELECT=20%L;=20$body$$outer$,=0A=20=09= (SELECT=20string_agg(g.i::text||':'||random()::text,=20'|')=20FROM=20= generate_series(1,=20100)=20g(i))));=0A=20=0A-=20=20=20=20--=20The=20= above=20bug=20requirs=20function=20removal=20to=20happen=20after=20a=20= catalog=0A+=20=20=20=20--=20The=20above=20bug=20requires=20function=20= removal=20to=20happen=20after=20a=20catalog=0A=20=20=20=20=20--=20= invalidation.=20dependency.c=20sorts=20objects=20in=20descending=20oid=20= order=20so=0A=20=20=20=20=20--=20that=20newer=20objects=20are=20deleted=20= before=20older=20objects,=20so=20create=20a=0A=20=20=20=20=20--=20table=20= after.=0Adiff=20--git=20= a/src/test/modules/test_resowner/test_resowner_many.c=20= b/src/test/modules/test_resowner/test_resowner_many.c=0Aindex=20= 4722c66267..7808c9e5df=20100644=0A---=20= a/src/test/modules/test_resowner/test_resowner_many.c=0A+++=20= b/src/test/modules/test_resowner/test_resowner_many.c=0A@@=20-196,7=20= +196,7=20@@=20GetTotalResourceCount(ManyTestResourceKind=20*kinds,=20int=20= nkinds)=0A=20=20*=20Remember=20lots=20of=20resources,=20belonging=20to=20= 'nkinds'=20different=20resource=20types=0A=20=20*=20with=20different=20= priorities.=20=20Then=20forget=20some=20of=20them,=20and=20finally,=20= release=0A=20=20*=20the=20resource=20owner.=20=20We=20use=20a=20custom=20= resource=20type=20that=20performs=20various=0A-=20*=20sanity=20checks=20= to=20verify=20that=20all=20the=20the=20resources=20are=20released,=20and=20= in=20the=0A+=20*=20sanity=20checks=20to=20verify=20that=20all=20the=20= resources=20are=20released,=20and=20in=20the=0A=20=20*=20correct=20= order.=0A=20=20*/=0A=20PG_FUNCTION_INFO_V1(test_resowner_many);=0Adiff=20= --git=20a/src/test/regress/expected/aggregates.out=20= b/src/test/regress/expected/aggregates.out=0Aindex=20= 50695d83a2..56c361ccef=20100644=0A---=20= a/src/test/regress/expected/aggregates.out=0A+++=20= b/src/test/regress/expected/aggregates.out=0A@@=20-2889,7=20+2889,7=20@@=20= GROUP=20BY=20c1.w,=20c1.z;=0A=20RESET=20enable_nestloop;=0A=20RESET=20= enable_hashjoin;=0A=20DROP=20TABLE=20group_agg_pk;=0A---=20Test=20the=20= case=20where=20the=20the=20ordering=20of=20scan=20matches=20the=20= ordering=20within=20the=0A+--=20Test=20the=20case=20where=20the=20= ordering=20of=20the=20scan=20matches=20the=20ordering=20within=20the=0A=20= --=20aggregate=20but=20cannot=20be=20found=20in=20the=20group-by=20list=0A= =20CREATE=20TABLE=20agg_sort_order=20(c1=20int=20PRIMARY=20KEY,=20c2=20= int);=0A=20CREATE=20UNIQUE=20INDEX=20agg_sort_order_c2_idx=20ON=20= agg_sort_order(c2);=0Adiff=20--git=20= a/src/test/regress/expected/copy.out=20= b/src/test/regress/expected/copy.out=0Aindex=20b48365ec98..44114089a6=20= 100644=0A---=20a/src/test/regress/expected/copy.out=0A+++=20= b/src/test/regress/expected/copy.out=0A@@=20-276,8=20+276,8=20@@=20= CREATE=20TABLE=20parted_si_p_even=20PARTITION=20OF=20parted_si=20FOR=20= VALUES=20IN=20(0);=0A=20CREATE=20TABLE=20parted_si_p_odd=20PARTITION=20= OF=20parted_si=20FOR=20VALUES=20IN=20(1);=0A=20--=20Test=20that=20bulk=20= relation=20extension=20handles=20reusing=20a=20single=20BulkInsertState=0A= =20--=20across=20partitions.=20=20Without=20the=20fix=20applied,=20this=20= reliably=20reproduces=0A---=20#18130=20unless=20shared_buffers=20is=20= extremely=20small=20(preventing=20any=20use=20use=20of=0A---=20bulk=20= relation=20extension).=20See=0A+--=20#18130=20unless=20shared_buffers=20= is=20extremely=20small=20(preventing=20any=20use=20of=20bulk=0A+--=20= relation=20extension).=20See=0A=20--=20= https://postgr.es/m/18130-7a86a7356a75209d%40postgresql.org=0A=20--=20= https://postgr.es/m/257696.1695670946%40sss.pgh.pa.us=0A=20\set=20= filename=20:abs_srcdir=20'/data/desc.data'=0Adiff=20--git=20= a/src/test/regress/expected/foreign_key.out=20= b/src/test/regress/expected/foreign_key.out=0Aindex=20= af2a878dd6..0b55167ac8=20100644=0A---=20= a/src/test/regress/expected/foreign_key.out=0A+++=20= b/src/test/regress/expected/foreign_key.out=0A@@=20-2734,7=20+2734,7=20= @@=20UPDATE=20fkpart10.tbl1=20SET=20f1=20=3D=202=20WHERE=20f1=20=3D=201;=0A= =20INSERT=20INTO=20fkpart10.tbl1=20VALUES=20(0),=20(1);=0A=20COMMIT;=0A=20= --=20test=20that=20cross-partition=20updates=20correctly=20enforces=20= the=20foreign=20key=0A---=20restriction=20(specifically=20testing=20= INITIAILLY=20DEFERRED)=0A+--=20restriction=20(specifically=20testing=20= INITIALLY=20DEFERRED)=0A=20BEGIN;=0A=20UPDATE=20fkpart10.tbl1=20SET=20f1=20= =3D=203=20WHERE=20f1=20=3D=200;=0A=20UPDATE=20fkpart10.tbl3=20SET=20f1=20= =3D=20f1=20*=20-1;=0Adiff=20--git=20= a/src/test/regress/expected/publication.out=20= b/src/test/regress/expected/publication.out=0Aindex=20= 0c5521d2aa..09a8d8221c=20100644=0A---=20= a/src/test/regress/expected/publication.out=0A+++=20= b/src/test/regress/expected/publication.out=0A@@=20-945,10=20+945,10=20= @@=20ALTER=20TABLE=20rf_tbl_abcd_part_pk=20ATTACH=20PARTITION=20= rf_tbl_abcd_part_pk_1=20FOR=20VALUE=0A=20SET=20client_min_messages=20=3D=20= 'ERROR';=0A=20CREATE=20PUBLICATION=20testpub6=20FOR=20TABLE=20= rf_tbl_abcd_pk=20(a,=20b);=0A=20RESET=20client_min_messages;=0A---=20ok=20= -=20(a,b)=20coverts=20all=20PK=20cols=0A+--=20ok=20-=20(a,b)=20covers=20= all=20PK=20cols=0A=20UPDATE=20rf_tbl_abcd_pk=20SET=20a=20=3D=201;=0A=20= ALTER=20PUBLICATION=20testpub6=20SET=20TABLE=20rf_tbl_abcd_pk=20(a,=20b,=20= c);=0A---=20ok=20-=20(a,b,c)=20coverts=20all=20PK=20cols=0A+--=20ok=20-=20= (a,b,c)=20covers=20all=20PK=20cols=0A=20UPDATE=20rf_tbl_abcd_pk=20SET=20= a=20=3D=201;=0A=20ALTER=20PUBLICATION=20testpub6=20SET=20TABLE=20= rf_tbl_abcd_pk=20(a);=0A=20--=20fail=20-=20"b"=20is=20missing=20from=20= the=20column=20list=0Adiff=20--git=20= a/src/test/regress/expected/tsdicts.out=20= b/src/test/regress/expected/tsdicts.out=0Aindex=204eff85da79..0bbf2ff4ca=20= 100644=0A---=20a/src/test/regress/expected/tsdicts.out=0A+++=20= b/src/test/regress/expected/tsdicts.out=0A@@=20-689,7=20+689,7=20@@=20= CREATE=20TEXT=20SEARCH=20DICTIONARY=20tsdict_case=0A=20ERROR:=20=20= unrecognized=20Ispell=20parameter:=20"DictFile"=0A=20--=20Test=20grammar=20= for=20configurations=0A=20CREATE=20TEXT=20SEARCH=20CONFIGURATION=20= dummy_tst=20(COPY=3Denglish);=0A---=20Overriden=20mapping=20change=20= with=20duplicated=20tokens.=0A+--=20Overridden=20mapping=20change=20with=20= duplicated=20tokens.=0A=20ALTER=20TEXT=20SEARCH=20CONFIGURATION=20= dummy_tst=0A=20=20=20ALTER=20MAPPING=20FOR=20word,=20word=20WITH=20= ispell;=0A=20--=20Not=20a=20token=20supported=20by=20the=20= configuration's=20parser,=20fails.=0Adiff=20--git=20= a/src/test/regress/sql/aggregates.sql=20= b/src/test/regress/sql/aggregates.sql=0Aindex=202905848ead..d28338ba3d=20= 100644=0A---=20a/src/test/regress/sql/aggregates.sql=0A+++=20= b/src/test/regress/sql/aggregates.sql=0A@@=20-1257,7=20+1257,7=20@@=20= RESET=20enable_nestloop;=0A=20RESET=20enable_hashjoin;=0A=20DROP=20TABLE=20= group_agg_pk;=0A=20=0A---=20Test=20the=20case=20where=20the=20the=20= ordering=20of=20scan=20matches=20the=20ordering=20within=20the=0A+--=20= Test=20the=20case=20where=20the=20ordering=20of=20the=20scan=20matches=20= the=20ordering=20within=20the=0A=20--=20aggregate=20but=20cannot=20be=20= found=20in=20the=20group-by=20list=0A=20CREATE=20TABLE=20agg_sort_order=20= (c1=20int=20PRIMARY=20KEY,=20c2=20int);=0A=20CREATE=20UNIQUE=20INDEX=20= agg_sort_order_c2_idx=20ON=20agg_sort_order(c2);=0Adiff=20--git=20= a/src/test/regress/sql/copy.sql=20b/src/test/regress/sql/copy.sql=0A= index=2043d2e906dd..e2dd24cb35=20100644=0A---=20= a/src/test/regress/sql/copy.sql=0A+++=20b/src/test/regress/sql/copy.sql=0A= @@=20-306,8=20+306,8=20@@=20CREATE=20TABLE=20parted_si_p_odd=20PARTITION=20= OF=20parted_si=20FOR=20VALUES=20IN=20(1);=0A=20=0A=20--=20Test=20that=20= bulk=20relation=20extension=20handles=20reusing=20a=20single=20= BulkInsertState=0A=20--=20across=20partitions.=20=20Without=20the=20fix=20= applied,=20this=20reliably=20reproduces=0A---=20#18130=20unless=20= shared_buffers=20is=20extremely=20small=20(preventing=20any=20use=20use=20= of=0A---=20bulk=20relation=20extension).=20See=0A+--=20#18130=20unless=20= shared_buffers=20is=20extremely=20small=20(preventing=20any=20use=20of=20= bulk=0A+--=20relation=20extension).=20See=0A=20--=20= https://postgr.es/m/18130-7a86a7356a75209d%40postgresql.org=0A=20--=20= https://postgr.es/m/257696.1695670946%40sss.pgh.pa.us=0A=20\set=20= filename=20:abs_srcdir=20'/data/desc.data'=0Adiff=20--git=20= a/src/test/regress/sql/foreign_key.sql=20= b/src/test/regress/sql/foreign_key.sql=0Aindex=2022e177f89b..f5e0938999=20= 100644=0A---=20a/src/test/regress/sql/foreign_key.sql=0A+++=20= b/src/test/regress/sql/foreign_key.sql=0A@@=20-1943,7=20+1943,7=20@@=20= INSERT=20INTO=20fkpart10.tbl1=20VALUES=20(0),=20(1);=0A=20COMMIT;=0A=20=0A= =20--=20test=20that=20cross-partition=20updates=20correctly=20enforces=20= the=20foreign=20key=0A---=20restriction=20(specifically=20testing=20= INITIAILLY=20DEFERRED)=0A+--=20restriction=20(specifically=20testing=20= INITIALLY=20DEFERRED)=0A=20BEGIN;=0A=20UPDATE=20fkpart10.tbl1=20SET=20f1=20= =3D=203=20WHERE=20f1=20=3D=200;=0A=20UPDATE=20fkpart10.tbl3=20SET=20f1=20= =3D=20f1=20*=20-1;=0Adiff=20--git=20= a/src/test/regress/sql/publication.sql=20= b/src/test/regress/sql/publication.sql=0Aindex=208ba8036bfb..479d4f3264=20= 100644=0A---=20a/src/test/regress/sql/publication.sql=0A+++=20= b/src/test/regress/sql/publication.sql=0A@@=20-603,10=20+603,10=20@@=20= ALTER=20TABLE=20rf_tbl_abcd_part_pk=20ATTACH=20PARTITION=20= rf_tbl_abcd_part_pk_1=20FOR=20VALUE=0A=20SET=20client_min_messages=20=3D=20= 'ERROR';=0A=20CREATE=20PUBLICATION=20testpub6=20FOR=20TABLE=20= rf_tbl_abcd_pk=20(a,=20b);=0A=20RESET=20client_min_messages;=0A---=20ok=20= -=20(a,b)=20coverts=20all=20PK=20cols=0A+--=20ok=20-=20(a,b)=20covers=20= all=20PK=20cols=0A=20UPDATE=20rf_tbl_abcd_pk=20SET=20a=20=3D=201;=0A=20= ALTER=20PUBLICATION=20testpub6=20SET=20TABLE=20rf_tbl_abcd_pk=20(a,=20b,=20= c);=0A---=20ok=20-=20(a,b,c)=20coverts=20all=20PK=20cols=0A+--=20ok=20-=20= (a,b,c)=20covers=20all=20PK=20cols=0A=20UPDATE=20rf_tbl_abcd_pk=20SET=20= a=20=3D=201;=0A=20ALTER=20PUBLICATION=20testpub6=20SET=20TABLE=20= rf_tbl_abcd_pk=20(a);=0A=20--=20fail=20-=20"b"=20is=20missing=20from=20= the=20column=20list=0Adiff=20--git=20a/src/test/regress/sql/tsdicts.sql=20= b/src/test/regress/sql/tsdicts.sql=0Aindex=206a2b00369c..cf08410bb2=20= 100644=0A---=20a/src/test/regress/sql/tsdicts.sql=0A+++=20= b/src/test/regress/sql/tsdicts.sql=0A@@=20-254,7=20+254,7=20@@=20CREATE=20= TEXT=20SEARCH=20DICTIONARY=20tsdict_case=0A=20=0A=20--=20Test=20grammar=20= for=20configurations=0A=20CREATE=20TEXT=20SEARCH=20CONFIGURATION=20= dummy_tst=20(COPY=3Denglish);=0A---=20Overriden=20mapping=20change=20= with=20duplicated=20tokens.=0A+--=20Overridden=20mapping=20change=20with=20= duplicated=20tokens.=0A=20ALTER=20TEXT=20SEARCH=20CONFIGURATION=20= dummy_tst=0A=20=20=20ALTER=20MAPPING=20FOR=20word,=20word=20WITH=20= ispell;=0A=20--=20Not=20a=20token=20supported=20by=20the=20= configuration's=20parser,=20fails.=0Adiff=20--git=20= a/src/test/subscription/t/004_sync.pl=20= b/src/test/subscription/t/004_sync.pl=0Aindex=20e077e255fc..a2d9462395=20= 100644=0A---=20a/src/test/subscription/t/004_sync.pl=0A+++=20= b/src/test/subscription/t/004_sync.pl=0A@@=20-165,7=20+165,7=20@@=20= $node_subscriber->safe_psql('postgres',=20"DROP=20SUBSCRIPTION=20= tap_sub");=0A=20=0A=20#=20When=20DROP=20SUBSCRIPTION=20tries=20to=20drop=20= the=20tablesync=20slot,=20the=20slot=20may=20not=0A=20#=20have=20been=20= created,=20which=20causes=20the=20slot=20to=20be=20created=20after=20the=20= DROP=0A-#=20SUSCRIPTION=20finishes.=20Such=20slots=20eventually=20get=20= dropped=20at=20walsender=20exit=0A+#=20SUBSCRIPTION=20finishes.=20Such=20= slots=20eventually=20get=20dropped=20at=20walsender=20exit=0A=20#=20= time.=20So,=20to=20prevent=20being=20affected=20by=20such=20ephemeral=20= tablesync=20slots,=20we=0A=20#=20wait=20until=20all=20the=20slots=20have=20= been=20cleaned.=0A=20ok(=20$node_publisher->poll_query_until(=0Adiff=20= --git=20a/src/test/subscription/t/026_stats.pl=20= b/src/test/subscription/t/026_stats.pl=0Aindex=20bac1cf3983..d1d68fad9a=20= 100644=0A---=20a/src/test/subscription/t/026_stats.pl=0A+++=20= b/src/test/subscription/t/026_stats.pl=0A@@=20-271,7=20+271,7=20@@=20is(=20= $node_subscriber->safe_psql(=0A=20my=20$sub2_oid=20=3D=20= $node_subscriber->safe_psql($db,=0A=20=09qq(SELECT=20oid=20FROM=20= pg_subscription=20WHERE=20subname=20=3D=20'$sub2_name'));=0A=20=0A-#=20= Diassociate=20the=20subscription=202=20from=20its=20replication=20slot=20= and=20drop=20it=0A+#=20Disassociate=20the=20subscription=202=20from=20= its=20replication=20slot=20and=20drop=20it=0A=20= $node_subscriber->safe_psql(=0A=20=09$db,=0A=20=09qq(=0A--=20=0A2.39.3=20= (Apple=20Git-146)=0A=0A= --Apple-Mail=_387381EC-AC34-4F8C-AC3F-E167818182D3--