Re: Add os_page_num to pg_buffercache - Mailing list pgsql-hackers

From Mircea Cadariu
Subject Re: Add os_page_num to pg_buffercache
Date
Msg-id e11896e2-9bc9-4994-ab1b-ccf6245d4b02@gmail.com
Whole thread Raw
In response to Re: Add os_page_num to pg_buffercache  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Add os_page_num to pg_buffercache
List pgsql-hackers

Hi, 


Thanks for the update! I tried v5 and it returns the expected results on my laptop, same as before.

Just two further remarks for your consideration. 

+      <para>
+       number of OS memory page for this buffer
+      </para></entry>
Let's capitalize the first letter here. 


+-- Check that the functions / views can't be accessed by default. To avoid
+-- having to create a dedicated user, use the pg_database_owner pseudo-role.
+SET ROLE pg_database_owner;
+SELECT count(*) > 0 FROM pg_buffercache_os_pages;
+RESET role;
+
+-- Check that pg_monitor is allowed to query view / function
+SET ROLE pg_monitor;
+SELECT count(*) > 0 FROM pg_buffercache_os_pages;
+RESET role;
In the existing pg_buffercache.sql there are sections similar to the above (SET ROLE pg_database_owner/pg_monitor ... RESET role), with a couple of different SELECT statements within. Should we rather add the above new SELECTs there, instead of in the new pg_buffercache_os_pages.sql?


Kind regards,

Mircea Cadariu   


pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Next
From: Nathan Bossart
Date:
Subject: Re: trivial grammar refactor