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 1o4CCg-0003LC-15 for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Jun 2022 02:04:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o4CCe-0006BM-1Y for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Jun 2022 02:04:16 +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 1o4CCd-0006BD-O8 for pgsql-bugs@lists.postgresql.org; Thu, 23 Jun 2022 02:04:15 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o4CCZ-0005Ga-Lg for pgsql-bugs@lists.postgresql.org; Thu, 23 Jun 2022 02:04:14 +0000 Received: by mail-pf1-x433.google.com with SMTP id w6so10551900pfw.5 for ; Wed, 22 Jun 2022 19:04:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vUVx0hb1e/XrpQ9m3vadYvWdG7eqNYQcfYGir03jR6E=; b=UIHTfBc56WJBXRgyo6rNsKQo6AOzdaHImTqyZYoiejjI2I00PSf6kAcOMj5sPObT2Z UV+RRGpHpAc7FcCmetxFPJOIuGMUbxEsA1/3h36T89qRYGyZifpuZMswic5xtsMY9zWe 8LrRVJdLw+ns952rhjCosu+xVlQNOPlZPhwM1a8WO8HLEhG9uBaQ2V9/R6NVLOSjYuQt CDiW1nWyQQp1YCS8N0bjDmexCs71UnvjKFgNMCkkb/mHMFVM5DNlEwx1BSVQBGk1bhAf H9sVmumezKVE4urkQukYzQRnmB6PKKTDSK1PmGSs2O65MBXdkvE0O2QdiSavIXfvBGpO I5mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vUVx0hb1e/XrpQ9m3vadYvWdG7eqNYQcfYGir03jR6E=; b=Nav/TCbpE03igp4Z1QpGogUsJNGVGDYi3gXIxLMPyUinoC5hdv3YBwCxFJEokrq8KV i1F5wsaFQTp1CyL9gCHpIhcF8CyqtddAnQCPO6Z18qbqzNlTS1lju+W2rx2DT0xxif/f ZKt/K4qTL5KqjHbTRfvpL8sUsrqYrYcYrXLDsHjlJ5GHTgE4ri36of7bJ/9VPaVsHeCD lu9GlT8aTMBNI+Cgm+WqAnxnyRRFvFud50HB1FrTLDrCSWsG8ad1RNxvOfV9WJwiVyLr DzVntHCmOwJWlCIeJKXn7Se0SXDTtV4iHrVpSWjNNkIRXMEQ7h8OpUHl5OLsAT/nfFvN Zl/g== X-Gm-Message-State: AJIora/kHD+GRHiygsTwVJt+bZ7xpXxb8G9CuqwhRmPC8WsFcGJrAKJS Ulqf01ew8yLVQ4u4tHcGQjcBPVvvMfZlZFQypOYEuS7o X-Google-Smtp-Source: AGRyM1ukPOa8sn328UgpUfO/7dj9032HPOXNNGp7b//bvHTQ0qJ6QbRu6ZysdritmwuIUZon1uDgAw7sAYhyFTTLX9c= X-Received: by 2002:a63:bf03:0:b0:40c:d8f7:d94d with SMTP id v3-20020a63bf03000000b0040cd8f7d94dmr5421427pgf.482.1655949849896; Wed, 22 Jun 2022 19:04:09 -0700 (PDT) MIME-Version: 1.0 References: <121e286f-3796-c9d7-9eab-6fb8e0b9c701@postgrespro.ru> In-Reply-To: <121e286f-3796-c9d7-9eab-6fb8e0b9c701@postgrespro.ru> From: Masahiko Sawada Date: Thu, 23 Jun 2022 11:03:33 +0900 Message-ID: Subject: Re: Postgres do not allow to create many tables with more than 63-symbols prefix To: Andrey Lepikhov Cc: PostgreSQL mailing lists , d.koval@postgrespro.ru Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Sat, Jun 4, 2022 at 4:03 AM Andrey Lepikhov wrote: > > According to subj you can try to create many tables (induced by the case > of partitioned table) with long prefix - see 6727v.sql for reproduction. > But now it's impossible because of logic of the makeUniqueTypeName() > routine. > You get the error: > ERROR: could not form array type name for type ... > > It is very corner case, of course. But solution is easy and short. So, > why not to fix? - See the patch in attachment. While this seems to be a good improvement, I think it's not a bug. Probably we cannot backpatch it as it will end up having type names defined by different naming rules. I'd suggest discussing it on -hackers. Regarding the patch, I think we can merge makeUniqueTypeName() to makeArrayTypeName() as there is no caller of makeUniqueTypeName() who pass tryOriginal = true. Also looking at other ChooseXXXName() functions, we don't care about integer overflow. Is it better to make it consistent with them? Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/