Re: Planning performance problem (67626.278ms)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Manuel Weitzman <manuelweitzman(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Jeremy Schneider <schnjere(at)amazon(dot)com>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Planning performance problem (67626.278ms)
Date: 2021-06-21 00:17:31
Message-ID: 1588548.1624234651@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Nagaraj Raj 2021-06-25 03:10:07 Partition column should be part of PK
Previous Message Dean Gibson (DB Administrator) 2021-06-20 23:53:35 Re: Estimating wal_keep_size