Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7d9043a

Browse files
committed
pg_buffercache: Remove unused fields from BufferCacheNumaRec
These fields have been added in commitba2a3c2, and have never beenused. While on it, this commit moves a comment that was out of place,improving it.Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/aSBOKX6pLJzumbmF@ip-10-97-1-34.eu-west-3.compute.internal
1 parentb140c8d commit7d9043a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

‎contrib/pg_buffercache/pg_buffercache_pages.c‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ typedef struct
8282
typedefstruct
8383
{
8484
TupleDesctupdesc;
85-
intbuffers_per_page;
86-
intpages_per_buffer;
87-
intos_page_size;
8885
BufferCacheNumaRec*record;
8986
}BufferCacheNumaContext;
9087

@@ -368,7 +365,12 @@ pg_buffercache_numa_pages(PG_FUNCTION_ARGS)
368365
os_page_ptrs=palloc0(sizeof(void*)*os_page_count);
369366
os_page_status=palloc(sizeof(uint64)*os_page_count);
370367

371-
/* Fill pointers for all the memory pages. */
368+
/*
369+
* Fill pointers for all the memory pages. This loop stores and
370+
* touches (if needed) addresses into os_page_ptrs[] as input to one
371+
* big move_pages(2) inquiry system call, as done in
372+
* pg_numa_query_pages().
373+
*/
372374
idx=0;
373375
for (char*ptr=startptr;ptr<endptr;ptr+=os_page_size)
374376
{
@@ -449,10 +451,6 @@ pg_buffercache_numa_pages(PG_FUNCTION_ARGS)
449451
* We don't hold the partition locks, so we don't get a consistent
450452
* snapshot across all buffers, but we do grab the buffer header
451453
* locks, so the information of each buffer is self-consistent.
452-
*
453-
* This loop touches and stores addresses into os_page_ptrs[] as input
454-
* to one big move_pages(2) inquiry system call. Basically we ask for
455-
* all memory pages for NBuffers.
456454
*/
457455
startptr= (char*)TYPEALIGN_DOWN(os_page_size, (char*)BufferGetBlock(1));
458456
idx=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp