pgsql: Fix more DSA problems uncovered by the buildfarm.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix more DSA problems uncovered by the buildfarm.
Date: 2016-12-05 15:40:24
Message-ID: E1cDvNQ-0006h7-1P@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix more DSA problems uncovered by the buildfarm.

On 32-bit systems, don't try to use 64-bit DSA pointers, because the
computation of DSA_MAX_SEGMENT_SIZE overflows Size.

Cast 1 to Size before shifting it, so that the compiler doesn't
produce a result of the wrong width.

In passing, change one use of size_t to Size.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/88f626f8680fbe93444582317d1adb375111855f

Modified Files
--------------
src/backend/utils/mmgr/dsa.c | 4 ++--
src/include/utils/dsa.h | 23 ++++++++++++++---------
2 files changed, 16 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-05 15:58:47 pgsql: Reduce the default for max_worker_processes back to 8.
Previous Message Robert Haas 2016-12-05 15:21:18 Re: [COMMITTERS] pgsql: Introduce dynamic shared memory areas.