pgsql: Fix calculation of how much shared memory is required to store a

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix calculation of how much shared memory is required to store a
Date: 2021-01-15 03:45:14
Message-ID: E1l0G30-0003bP-26@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix calculation of how much shared memory is required to store a TOC.

Commit ac883ac453 refactored shm_toc_estimate() but changed its calculation
of shared memory size for TOC incorrectly. Previously this could cause too
large memory to be allocated.

Back-patch to v11 where the bug was introduced.

Author: Takayuki Tsunakawa
Discussion: https://postgr.es/m/TYAPR01MB2990BFB73170E2C4921E2C4DFEA80@TYAPR01MB2990.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2ad78a87f018260d4474eee63187e1cc73c9b976

Modified Files
--------------
src/backend/storage/ipc/shm_toc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2021-01-15 03:45:43 pgsql: Fix calculation of how much shared memory is required to store a
Previous Message Michael Paquier 2021-01-15 03:00:41 pgsql: Remove PG_SHA*_DIGEST_STRING_LENGTH from sha2.h