Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
4eadf2d6
Commit
4eadf2d6
authored
28 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
More autosize structure error checks.
parent
37e86216
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/storage/buffer/buf_init.c
+5
-2
5 additions, 2 deletions
src/backend/storage/buffer/buf_init.c
with
5 additions
and
2 deletions
src/backend/storage/buffer/buf_init.c
+
5
−
2
View file @
4eadf2d6
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.
5
1997/01/2
3 18:14:40
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.
6
1997/01/2
5 21:01:16
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -136,7 +136,10 @@ InitBufferPool(IPCKey key)
...
@@ -136,7 +136,10 @@ InitBufferPool(IPCKey key)
int
i
;
int
i
;
/* check padding of BufferDesc and BufferHdr */
/* check padding of BufferDesc and BufferHdr */
if
(
sizeof
(
struct
sbufdesc
)
!=
PADDED_SBUFDESC_SIZE
)
/* we need both checks because a sbufdesc_padded > PADDED_SBUFDESC_SIZE
will shrink sbufdesc to the required size, which is bad */
if
(
sizeof
(
struct
sbufdesc
)
!=
PADDED_SBUFDESC_SIZE
||
sizeof
(
struct
sbufdesc_padded
)
>
PADDED_SBUFDESC_SIZE
)
elog
(
WARN
,
"Internal error: sbufdesc does not have the proper size, "
elog
(
WARN
,
"Internal error: sbufdesc does not have the proper size, "
"contact the Postgres developers"
);
"contact the Postgres developers"
);
if
(
sizeof
(
struct
sbufdesc_unpadded
)
<=
PADDED_SBUFDESC_SIZE
/
2
)
if
(
sizeof
(
struct
sbufdesc_unpadded
)
<=
PADDED_SBUFDESC_SIZE
/
2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment