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 1lv7dn-0005Eb-5O for pgsql-performance@arkaria.postgresql.org; Mon, 21 Jun 2021 00:18:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lv7dG-0007kv-F1 for pgsql-performance@arkaria.postgresql.org; Mon, 21 Jun 2021 00:17:42 +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 1lv7dG-0007kn-1c for pgsql-performance@lists.postgresql.org; Mon, 21 Jun 2021 00:17:42 +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 1lv7dA-0003NJ-EU for pgsql-performance@lists.postgresql.org; Mon, 21 Jun 2021 00:17:40 +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 15L0HVLa1588549; Sun, 20 Jun 2021 20:17:31 -0400 From: Tom Lane To: Ranier Vilela cc: Manuel Weitzman , David Rowley , Jeremy Schneider , "pgsql-performance@lists.postgresql.org" , Andres Freund Subject: Re: Planning performance problem (67626.278ms) In-reply-to: References: <6d58f68e-ed1a-c48e-1440-691554f6e1e7@9livesdata.com> <20190408144210.GG10080@telsasoft.com> <20190408232644.r6xixkeulsmomwfj@alap3.anarazel.de> <3f5e5673-06aa-bf7c-cdb7-0e053c45ba26@amazon.com> <767433.1619015825@sss.pgh.pa.us> Comments: In-reply-to Ranier Vilela message dated "Sun, 20 Jun 2021 20:23:40 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1588547.1624234651.1@sss.pgh.pa.us> Date: Sun, 20 Jun 2021 20:17:31 -0400 Message-ID: <1588548.1624234651@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ranier Vilela writes: > 3. Avoid use of type *long*, it is very problematic with 64 bits. > Windows 64 bits, long is 4 (four) bytes. > Linux 64 bits, long is 8 (eight) bytes. Agreed. > 4. Avoid C99 style declarations > for(unsigned long i = 0;) > Prefer: > size_t i; > for(i = 0;) > Helps backpatching to C89 versions. It seems unlikely that we'd consider back-patching this into pre-C99 branches, so I see no reason not to use C99 loop style. (But do keep in mind that we avoid most other C99-isms, such as intermixed decls and code.) regards, tom lane