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 1lGYo6-00065V-93 for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Mar 2021 03:01:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lGYo5-0004j2-50 for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Mar 2021 03:01:13 +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 1lGYo4-0004ip-VA for pgsql-bugs@lists.postgresql.org; Mon, 01 Mar 2021 03:01:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGYo2-0006To-Rl for pgsql-bugs@lists.postgresql.org; Mon, 01 Mar 2021 03:01:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12130un5666802; Sun, 28 Feb 2021 22:00:56 -0500 From: Tom Lane To: Kyotaro Horiguchi cc: hiramit.tm@gmail.com, kasahara.tatsuhito@gmail.com, magnus@hagander.net, andres@anarazel.de, masao.fujii@oss.nttdata.com, skoposov@ed.ac.uk, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table. In-reply-to: <20210301.112452.1902584192027811521.horikyota.ntt@gmail.com> References: <20210301.112452.1902584192027811521.horikyota.ntt@gmail.com> Comments: In-reply-to Kyotaro Horiguchi message dated "Mon, 01 Mar 2021 11:24:52 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <666800.1614567656.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 28 Feb 2021 22:00:56 -0500 Message-ID: <666801.1614567656@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Kyotaro Horiguchi writes: > At Mon, 1 Mar 2021 10:56:50 +0900, tomohiro hiramitsu wrote in = > + ereport(LOG, > + (errmsg("failed to assign new OID in relation \"%s\" after "UINT64_= FORMAT" retries", = > The embedded UINT64_FORMAT makes the message untranslatable on some > platforms. Right, we can't put platform-dependent substrings there. > The format string should > be handled separately from the message body. You will find an example > in WalReceiverMain(). Lately we've been using "%llu" or "%lld" for 64-bit values, and explicitly casting the argument to [unsigned] long long. That seems to work everywhere now that we always use our own snprintf code, and it's less notationally painful than other ways. regards, tom lane