Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTsf9-0004kf-Cz for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Apr 2020 19:46:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTsf8-0006aw-4D for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Apr 2020 19:46:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTsf7-0006ao-QZ for pgsql-hackers@lists.postgresql.org; Wed, 29 Apr 2020 19:46:29 +0000 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jTsf4-0004ij-Km for pgsql-hackers@lists.postgresql.org; Wed, 29 Apr 2020 19:46:28 +0000 Received: by mail-qt1-x835.google.com with SMTP id s30so3007032qth.2 for ; Wed, 29 Apr 2020 12:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tQG3hvC+SLsCHmUp11wg58DR1wVDerLWNJibqqC7UIw=; b=kB/je+3lMNaGE56hXKv2sQ156Mq0isCLpfWhs8qp5XjzsrVSteGa1OOxjSL+aBaFkY 1M4LXMGMJJAB1wTKtI3rflfsZjtzjornPojWyZ2GgGU1Htb+YgFTdUR517jXcifAjIaP XE9bhCtJgltFoIRABNNSbNwop7mc2y6j2AGJLC8ect6CTFD5bbJii79fTkcEsR8VTXR4 uAkY0NqxOCUegObCBsMqLSVqGRKdSQOHCDmNzyY1RMBfQb5c7F2KJik9ZJ0f1shDNNlM xBbU0OgLyWwF7cVkUACL0pl+yGtdrmtU3mx+4Trv/UM+HPpRHXpu2AElSMaAn1EEVV3S drig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tQG3hvC+SLsCHmUp11wg58DR1wVDerLWNJibqqC7UIw=; b=YsaswOQ7tPbbEZNXWuqcV1TaLHpZhl/jeKvWZAgNF0qi52jMqxz8CtT9eX+c7NoG9Y S3hQ3NPv5ABnndZ3yEa47OBMQCv6lg6qG5sGMtpj6ZZCw1SspDM1FhLCP3PVJk2AL4k/ 66ExoSDzLX8TDgj2RL+V85RMd4TqGjPS8iq4SVckcuhCJlAkP9krpPZB42mBgpWii1Sr LR057GlJkposXCVQaONoaqyFzarukanlzcPrHx4BnxmFp6NCg7467h6vzsxkxue/PieP mrV9TlhKoOyLnWRPwQ6sydpShTb3YwMDY9Ee3HJtB7gOB3OvMm1XHSQH31kenDR69Fmx L+6A== X-Gm-Message-State: AGi0PuZXf/Z2Rcpo0Cn0c5ywjUi7YpZbFe3Hhw3q6jnTWEN73RC0VndJ af6YbkfbyNNCsOb2U6oINMJBDBtkrWQ= X-Google-Smtp-Source: APiQypK1ixk6LNEkD69Fvm5zliRDbw8K0YuW8Hq9AoF5gAYO7diCPDDfjPAcDSeNdfBqLIW4KeSYYw== X-Received: by 2002:ac8:4b45:: with SMTP id e5mr28053179qts.86.1588189585308; Wed, 29 Apr 2020 12:46:25 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id x34sm173111qta.43.2020.04.29.12.46.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2020 12:46:24 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id C2551800897; Wed, 29 Apr 2020 14:46:22 -0500 (CDT) Date: Wed, 29 Apr 2020 14:46:22 -0500 From: Justin Pryzby To: Andres Freund Cc: Daniel Verite , pgsql-hackers@lists.postgresql.org Subject: Re: Cleanup/remove/update references to OID column Message-ID: <20200429194622.GA25643@telsasoft.com> References: <20190408002847.GA904@telsasoft.com> <20190410165917.GD10080@telsasoft.com> <20190418002347.rlqmypv5prlpl2bg@alap3.anarazel.de> <20190418004219.GJ2854@telsasoft.com> <20190418005115.r4mat75wvlski3ij@alap3.anarazel.de> <20190508190557.GD3925@telsasoft.com> <20190701155932.GA22866@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190701155932.GA22866@telsasoft.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Few comments seem to have dangling references to the behavior from pre-12 "WITH OIDS". Maybe varsup.c should get a wider change? diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index 1e743d7d86..ce84e22cbd 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -786,9 +786,7 @@ TupleDescInitEntryCollation(TupleDesc desc, * * Given a relation schema (list of ColumnDef nodes), build a TupleDesc. * - * Note: the default assumption is no OIDs; caller may modify the returned - * TupleDesc if it wants OIDs. Also, tdtypeid will need to be filled in - * later on. + * tdtypeid will need to be filled in later on. */ TupleDesc BuildDescForRelation(List *schema) diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c index 2570e7086a..2f0eab0f53 100644 --- a/src/backend/access/transam/varsup.c +++ b/src/backend/access/transam/varsup.c @@ -527,8 +527,7 @@ GetNewObjectId(void) * The first time through this routine after normal postmaster start, the * counter will be forced up to FirstNormalObjectId. This mechanism * leaves the OIDs between FirstBootstrapObjectId and FirstNormalObjectId - * available for automatic assignment during initdb, while ensuring they - * will never conflict with user-assigned OIDs. + * available for automatic assignment during initdb. */ if (ShmemVariableCache->nextOid < ((Oid) FirstNormalObjectId)) { diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 262e14ccfb..1ca11960e2 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -4813,7 +4813,7 @@ ATRewriteTables(AlterTableStmt *parsetree, List **wqueue, LOCKMODE lockmode, continue; /* - * If we change column data types or add/remove OIDs, the operation + * If we change column data types, the operation * has to be propagated to tables that use this table's rowtype as a * column type. tab->newvals will also be non-NULL in the case where * we're adding a column with a default. We choose to forbid that @@ -4837,8 +4837,7 @@ ATRewriteTables(AlterTableStmt *parsetree, List **wqueue, LOCKMODE lockmode, /* * We only need to rewrite the table if at least one column needs to - * be recomputed, we are adding/removing the OID column, or we are - * changing its persistence. + * be recomputed, or we are changing its persistence. * * There are two reasons for requiring a rewrite when changing * persistence: on one hand, we need to ensure that the buffers