Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 'Fix calculation of how much shared memory is required to store a TOC' #6881

Closed
tedyu opened this issue Jan 15, 2021 · 2 comments
Closed
Assignees

Comments

@tedyu
Copy link
Contributor

tedyu commented Jan 15, 2021

Upstream commit 2ad78a87f018260d4474eee63187e1cc73c9b976:

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.

Current YB code contains commit ac883ac453.

Backport this fix so that no too large memory is allocated

@tedyu tedyu self-assigned this Jan 15, 2021
@kmuthukk
Copy link
Collaborator

@tedyu --

Why can't I find the commit id you mention: ac883ac453 ?

@tedyu
Copy link
Contributor Author

tedyu commented Jan 15, 2021

Looking at ac883ac453e9c479f397780918f235c440b7a02f :

-   /* Make sure request is well-aligned. */
+   /*
+    * Make sure request is well-aligned.  XXX: MAXALIGN is not enough,
+    * because atomic ops might need a wider alignment.  We don't have a
+    * proper definition for the minimum to make atomic ops safe, but

The new comments are in YB.
We don't see commit ac883ac453e9c479f397780918f235c440b7a02f because YB was sync'ed with PG via:

commit cb4bd4c6490e7ed7921a6f241a4e2c6f841a4580
Author: YugaBot <[email protected]>
Date:   Tue Jan 15 21:06:54 2019 -0800

    Update PostgreSQL code as of the following commit:

      commit 6cd404b344f7e27f4d64555bb133f18a758fe851 (tag: REL_11_2)
      Author: Tom Lane <[email protected]>
      Date:   Mon Feb 11 16:17:27 2019 -0500

tedyu added a commit that referenced this issue Jan 15, 2021
…required to store a TOC'

Summary:
Upstream commit 2ad78a87f018260d4474eee63187e1cc73c9b976:

Original commit message

    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.Current YB code contains commit ac883ac453.

Backport this fix so that no too large memory is allocated.

Test Plan: Run test suite via Jenkins

Reviewers: jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D10367
@tedyu tedyu closed this as completed Jan 15, 2021
polarweasel pushed a commit to lizayugabyte/yugabyte-db that referenced this issue Mar 9, 2021
…mory is required to store a TOC'

Summary:
Upstream commit 2ad78a87f018260d4474eee63187e1cc73c9b976:

Original commit message

    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.Current YB code contains commit ac883ac453.

Backport this fix so that no too large memory is allocated.

Test Plan: Run test suite via Jenkins

Reviewers: jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D10367
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants