Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hb4KS-00050y-Ey for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Jun 2019 14:34:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hb4KQ-0005RK-C6 for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Jun 2019 14:34:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hb4KP-0005M8-VN for pgsql-hackers@lists.postgresql.org; Wed, 12 Jun 2019 14:34:18 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hb4KJ-00079G-Qg for pgsql-hackers@postgresql.org; Wed, 12 Jun 2019 14:34:16 +0000 Received: by mail-lj1-x232.google.com with SMTP id v18so15311630ljh.6 for ; Wed, 12 Jun 2019 07:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:message-id:date:user-agent:mime-version :content-language; bh=bNceOOMlUT3vv8WcWxc2bHoipm5Zd7W+9WQuUBSyuuc=; b=PTU6Wk4H4AAkQhMlv24nDAyQTHsSniXUdsvcI90R0FNaJpcmC7mK6Nodb/i4YUImYQ aGNfU7EZSmezmwd+p09VYh7NpZtVsGQwTMrdUbTZdIVl087kSfgY914vMg+swsvms3bq YhkGdPKDttfnB9S8tWcd2oIGQ5hDx5EdeSScOuR6GoxHJCY5mJoAFZO0Pgfr/KT09b4Q GNaoz5sllfOVBUUnqmnWZBZ55K72aX+G6aoBtrJZ/fwBdULkUHQipnOFa3oQjTlgErNg DLczr8tWNBHDbh65q6EAXaJY8hVvn04EPYxkKDJ3D+f/bFNGxi4Y1f+g7+ZArTvoMOSK bltA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-language; bh=bNceOOMlUT3vv8WcWxc2bHoipm5Zd7W+9WQuUBSyuuc=; b=AdSBG4OcfMwxv1MXgcHONvkK8AIquwsGVFaWjwyownMA7/dyO7QSxkVrVrSKMSA0UL yCQFLBDfMtFU0ALCWgvIVNQNcAqsuOhKpv1rQus+vO8ClrX+hb2pDn9iculWLrSTwmVC xaFVFKr83W9hrJafWe1gXpVHhVdkf0WQjexwNhJF/t7DpwVYp6W7B/TvAJ4D+TcrgfKo m2nydrCAA8jEwv4PVcle19lvBom0Fru6c48KQhn9RdqDSppz0egTHgriCr2VsQqnNcRu wohtcX1bXmByyDdWM1Hxd9C5G96siHuMd6dw2OVKRGJEE7753VjcmUUd8CQR1lW3pkd9 rVzA== X-Gm-Message-State: APjAAAXgoHCz0dWpT0xsPDt6FGuWXykPYpRsXPj7xJgEtHK/wrlEVC14 g8mt+tUCjX57n9LrjW73+o8FhGaz X-Google-Smtp-Source: APXvYqw5rnpIwP7rbgLMRuJa8LEiAZ52sKiqEw0x+xMxAw0WqgNYJjnB76IJ1dsPvoBuudFJT6Xkmw== X-Received: by 2002:a2e:8e90:: with SMTP id z16mr6431512ljk.4.1560350048646; Wed, 12 Jun 2019 07:34:08 -0700 (PDT) Received: from [1.0.0.7] ([178.155.4.56]) by smtp.gmail.com with ESMTPSA id h11sm8729lfm.14.2019.06.12.07.34.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jun 2019 07:34:07 -0700 (PDT) From: Alexander Lakhin Subject: Fix inconsistencies for v12 (pass 2) To: Amit Kapila , pgsql-hackers Message-ID: Date: Wed, 12 Jun 2019 17:34:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3B05833C336894D8C29EF3BE" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------3B05833C336894D8C29EF3BE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hello Amit, Can you also review the following fixes?: 2.1. bt_binsrch_insert -> _bt_binsrch_insert (an internal inconsistency) 2.2. EWOULDBOCK -> EWOULDBLOCK (a typo) 2.3. FORGET_RELATION_FSYNC & FORGET_DATABASE_FSYNC -> SYNC_FORGET_REQUEST (orphaned after 3eb77eba) 2.4. GetNewObjectIdWithIndex -> GetNewOidWithIndex (an internal inconsistency) 2.5. get_opclass_family_and_input_type -> get_opclass_opfamily_and_input_type (an internal inconsistency) 2.6. HAVE_BUILTIN_CLZ -> HAVE__BUILTIN_CLZ (missing underscore) 2.7. HAVE_BUILTIN_CTZ -> HAVE__BUILTIN_CTZ (missing underscore) 2.8. MultiInsertInfoNextFreeSlot -> CopyMultiInsertInfoNextFreeSlot (an internal inconsistency) 2.9. targetIsArray -> targetIsSubscripting (an internal inconsistency) 2.10. tss_htup -> remove (orphaned after 2e3da03e) I can't see another inconsistencies for v12 for now, but there are some that appeared before. If this work can be performed more effectively or should be postponed/canceled, please let me know. Best regards, Alexander --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="bt_binsrch_insert.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bt_binsrch_insert.patch" diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 1f809c24a1..c655dadb96 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -424,7 +424,7 @@ _bt_binsrch(Relation rel, /* * - * bt_binsrch_insert() -- Cacheable, incremental leaf page binary search. + * _bt_binsrch_insert() -- Cacheable, incremental leaf page binary search. * * Like _bt_binsrch(), but with support for caching the binary search * bounds. Only used during insertion, and only on the leaf page that it --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="EWOULDBOCK.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="EWOULDBOCK.patch" diff --git a/src/backend/libpq/be-secure-gssapi.c b/src/backend/libpq/be-secure-gssapi.c index 1673b10315..ba8c0cd0f0 100644 --- a/src/backend/libpq/be-secure-gssapi.c +++ b/src/backend/libpq/be-secure-gssapi.c @@ -400,7 +400,7 @@ read_or_wait(Port *port, ssize_t len) { /* * If we got back less than zero, indicating an error, and that - * wasn't just a EWOULDBOCK/EAGAIN, then give up. + * wasn't just a EWOULDBLOCK/EAGAIN, then give up. */ if (ret < 0 && !(errno == EWOULDBLOCK || errno == EAGAIN)) return -1; --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="FORGET_RELATION_FSYNC.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="FORGET_RELATION_FSYNC.patch" diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index 13f152b473..6ceff63ae1 100644 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@ -1213,8 +1213,8 @@ CompactCheckpointerRequestQueue(void) * backwards from the end of the queue and check whether a request is * *preceded* by an earlier, identical request, in the hopes of doing less * copying. But that might change the semantics, if there's an - * intervening FORGET_RELATION_FSYNC or FORGET_DATABASE_FSYNC request, so - * we do it this way. It would be possible to be even smarter if we made + * intervening SYNC_FORGET_REQUEST, so we do it this way. + * It would be possible to be even smarter if we made * the code below understand the specific semantics of such requests (it * could blow away preceding entries that would end up being canceled * anyhow), but it's not clear that the extra complexity would buy us --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="get_opclass_family_and_input_type.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="get_opclass_family_and_input_type.patch" diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index b4f2d0f35a..c13c08a97b 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -1055,7 +1055,7 @@ get_opclass_input_type(Oid opclass) } /* - * get_opclass_family_and_input_type + * get_opclass_opfamily_and_input_type * * Returns the OID of the operator family the opclass belongs to, * the OID of the datatype the opclass indexes --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="GetNewObjectIdWithIndex.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="GetNewObjectIdWithIndex.patch" diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c index 11936a6571..a065419cdb 100644 --- a/src/backend/catalog/catalog.c +++ b/src/backend/catalog/catalog.c @@ -383,7 +383,7 @@ GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn) * is also an unused OID within pg_class. If the result is to be used only * as a relfilenode for an existing relation, pass NULL for pg_class. * - * As with GetNewObjectIdWithIndex(), there is some theoretical risk of a race + * As with GetNewOidWithIndex(), there is some theoretical risk of a race * condition, but it doesn't seem worth worrying about. * * Note: we don't support using this in bootstrap mode. All relations --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="HAVE_BUILTIN_CLZ.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="HAVE_BUILTIN_CLZ.patch" diff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c index 60fb55af53..589c2f1615 100644 --- a/src/port/pg_bitutils.c +++ b/src/port/pg_bitutils.c @@ -28,7 +28,7 @@ * left-most the 7th bit. The 0th entry of the array should not be used. * * Note: this is not used by the functions in pg_bitutils.h when - * HAVE_BUILTIN_CLZ is defined, but we provide it anyway, so that + * HAVE__BUILTIN_CLZ is defined, but we provide it anyway, so that * extensions possibly compiled with a different compiler can use it. */ const uint8 pg_leftmost_one_pos[256] = { --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="HAVE_BUILTIN_CTZ.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="HAVE_BUILTIN_CTZ.patch" diff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c index 60fb55af53..8d9f5be32a 100644 --- a/src/port/pg_bitutils.c +++ b/src/port/pg_bitutils.c @@ -56,7 +56,7 @@ const uint8 pg_leftmost_one_pos[256] = { * left-most the 7th bit. The 0th entry of the array should not be used. * * Note: this is not used by the functions in pg_bitutils.h when - * HAVE_BUILTIN_CTZ is defined, but we provide it anyway, so that + * HAVE__BUILTIN_CTZ is defined, but we provide it anyway, so that * extensions possibly compiled with a different compiler can use it. */ const uint8 pg_rightmost_one_pos[256] = { --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="MultiInsertInfoNextFreeSlot.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="MultiInsertInfoNextFreeSlot.patch" diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 84c54fbc70..ac86f3d5be 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -2626,7 +2626,7 @@ CopyMultiInsertInfoNextFreeSlot(CopyMultiInsertInfo *miinfo, /* * Record the previously reserved TupleTableSlot that was reserved by - * MultiInsertInfoNextFreeSlot as being consumed. + * CopyMultiInsertInfoNextFreeSlot as being consumed. */ static inline void CopyMultiInsertInfoStore(CopyMultiInsertInfo *miinfo, ResultRelInfo *rri, --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="targetIsArray.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="targetIsArray.patch" diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index ef2f5b45d8..ba470366e1 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -38,7 +38,7 @@ static void markTargetListOrigin(ParseState *pstate, TargetEntry *tle, static Node *transformAssignmentIndirection(ParseState *pstate, Node *basenode, const char *targetName, - bool targetIsArray, + bool targetIsSubscripting, Oid targetTypeId, int32 targetTypMod, Oid targetCollation, --------------3B05833C336894D8C29EF3BE Content-Type: text/x-patch; name="tss_htup.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tss_htup.patch" diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 99b9fa414f..ab985b60c6 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -1571,7 +1571,6 @@ typedef struct TidScanState int tss_NumTids; int tss_TidPtr; ItemPointerData *tss_TidList; - HeapTupleData tss_htup; } TidScanState; /* ---------------- --------------3B05833C336894D8C29EF3BE--