Re: Planning performance problem (67626.278ms) - Mailing list pgsql-performance

From Tom Lane
Subject Re: Planning performance problem (67626.278ms)
Date
Msg-id 1588548.1624234651@sss.pgh.pa.us
Whole thread Raw
In response to Re: Planning performance problem (67626.278ms)  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Planning performance problem (67626.278ms)  (Manuel Weitzman <manuelweitzman@gmail.com>)
List pgsql-performance
Ranier Vilela <ranier.vf@gmail.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



pgsql-performance by date:

Previous
From: "Dean Gibson (DB Administrator)"
Date:
Subject: Re: Estimating wal_keep_size
Next
From: Nagaraj Raj
Date:
Subject: Partition column should be part of PK