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 1nc1H1-0002yL-8x for pgsql-committers@arkaria.postgresql.org; Wed, 06 Apr 2022 08:44:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nc1Gz-0001vJ-D5 for pgsql-committers@arkaria.postgresql.org; Wed, 06 Apr 2022 08:44:17 +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 1nc1Gz-0001qn-5U for pgsql-committers@lists.postgresql.org; Wed, 06 Apr 2022 08:44:17 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nc1Gw-0001Ko-N7 for pgsql-committers@lists.postgresql.org; Wed, 06 Apr 2022 08:44:16 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2DE5B5C015B; Wed, 6 Apr 2022 04:44:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 06 Apr 2022 04:44:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=+Um95lz4NcE3orfSL3HUNlOSUKz6veex7FFYxePi4BM=; b=M04Dr/PD OYLqP9CDOwKbUPatDBThlAIr2Bv5C3FuRt8/eQ6cRdzCrJ1wsGYwl152pl4G6I2h 7lA2e4r/LZu/+i8wUHC41uKdOth840k77fjauUGf+HP5UM0/10MsGRrhwTaGfgBg b8wQrM5rkAZMY8O6cAAVJ3MV8vWvkSPTQygYv0j1TY+c7hsBQ2LtkZDs8ykA2MHr rtdqyXmSOkKhAFGBSqtBq/3mKwNJIZ2Mkz6ogI6HJ4uHJh7XISl+L7Tc5es4qRWa Vodwc34BDistDzNfz0uZgTkNJ0JE8ldhNEDAwsn/RJ7E3ql9MwXgSv34IZZb8h0F qwKTxbnDocWcng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejiedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Apr 2022 04:44:13 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 073522A0FF5; Wed, 6 Apr 2022 04:44:51 -0400 (-04) Date: Wed, 6 Apr 2022 10:44:50 +0200 From: Alvaro Herrera To: Daniel Gustafsson Cc: Daniel Gustafsson , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: pg_rewind: Fetch small files according to new size. Message-ID: <202204060844.l7zjinlqcwoq@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Apr-05, Daniel Gustafsson wrote: > local_source.c:118:15: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] > srcpath, len, written_len); > ~~~~~~~~~^~~~~~~~~~~~~~~~~ > > I'm running a fixup with casting to int and printing with %d (like how > pg_rewind.c:digestControlFile already does it for printing a size_t) through CI > just to be sure and will push once it's had a green run: > > - pg_fatal("size of source file \"%s\" changed concurrently: " UINT64_FORMAT " bytes expected, " UINT64_FORMAT " copied", > - srcpath, len, written_len); > + pg_fatal("size of source file \"%s\" changed concurrently: %d bytes expected, %d copied", > + srcpath, (int) len, (int) written_len); Hmm, it is typical to cast file sizes to long long and print with %lld. See d914eb347fcd for a recent example. .. oh, I see you pushed already. Not sure this is worth fixing, since the original commit message claimed to involve only "small files". I suppose having a non-relation-file in the datadir that's bigger than 4GB is not expected? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ Essentially, you're proposing Kevlar shoes as a solution for the problem that you want to walk around carrying a loaded gun aimed at your foot. (Tom Lane)