pg_buffercache description

Started by Satoshi Nagayasuover 13 years ago4 messagesdocs
Jump to latest
#1Satoshi Nagayasu
snaga@uptime.jp

Hi,

I found that the manual page for pg_buffercache module explains
"usagecount" as "Page LRU count".

http://www.postgresql.org/docs/devel/static/pgbuffercache.html

However, AFAIK, "usagecount" is not a LRU count nowadays, because
LRU is no longer used for the buffer management algorithm.

I think it should be described as "Clock-sweep count" or something
like that.

And I'd like to add some additional explanation for the "forknumber"
as below:

"0 for heap file, 1 for FreeSpaceMap, and 2 for VisibilityMap".

Any comments?

Regards,
--
Satoshi Nagayasu <snaga@uptime.jp>
Uptime Technologies, LLC. http://www.uptime.jp

#2Bruce Momjian
bruce@momjian.us
In reply to: Satoshi Nagayasu (#1)
Re: pg_buffercache description

On Sat, Nov 24, 2012 at 11:57:51AM +0900, Satoshi Nagayasu wrote:

Hi,

I found that the manual page for pg_buffercache module explains
"usagecount" as "Page LRU count".

http://www.postgresql.org/docs/devel/static/pgbuffercache.html

However, AFAIK, "usagecount" is not a LRU count nowadays, because
LRU is no longer used for the buffer management algorithm.

I think it should be described as "Clock-sweep count" or something
like that.

And I'd like to add some additional explanation for the "forknumber"
as below:

"0 for heap file, 1 for FreeSpaceMap, and 2 for VisibilityMap".

Any comments?

Good suggestion. I ended up referencing the C file that contains the
"forknumber" definitions, rather than recreating the list in the docs.
I applied the attached patch to head and 9.3.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachments:

buffer.difftext/x-diff; charset=us-asciiDownload+5-5
#3Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#2)
Re: pg_buffercache description

On Wed, Jul 3, 2013 at 02:23:11PM -0400, Bruce Momjian wrote:

On Sat, Nov 24, 2012 at 11:57:51AM +0900, Satoshi Nagayasu wrote:

Hi,

I found that the manual page for pg_buffercache module explains
"usagecount" as "Page LRU count".

http://www.postgresql.org/docs/devel/static/pgbuffercache.html

However, AFAIK, "usagecount" is not a LRU count nowadays, because
LRU is no longer used for the buffer management algorithm.

I think it should be described as "Clock-sweep count" or something
like that.

And I'd like to add some additional explanation for the "forknumber"
as below:

"0 for heap file, 1 for FreeSpaceMap, and 2 for VisibilityMap".

Any comments?

Good suggestion. I ended up referencing the C file that contains the
"forknumber" definitions, rather than recreating the list in the docs.
I applied the attached patch to head and 9.3.

I ended up applying it to 9.2 as well.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

#4Satoshi Nagayasu
snaga@uptime.jp
In reply to: Bruce Momjian (#3)
Re: pg_buffercache description

Thanks, Bruce!

2013/07/04 3:26, Bruce Momjian wrote:

On Wed, Jul 3, 2013 at 02:23:11PM -0400, Bruce Momjian wrote:

On Sat, Nov 24, 2012 at 11:57:51AM +0900, Satoshi Nagayasu wrote:

Hi,

I found that the manual page for pg_buffercache module explains
"usagecount" as "Page LRU count".

http://www.postgresql.org/docs/devel/static/pgbuffercache.html

However, AFAIK, "usagecount" is not a LRU count nowadays, because
LRU is no longer used for the buffer management algorithm.

I think it should be described as "Clock-sweep count" or something
like that.

And I'd like to add some additional explanation for the "forknumber"
as below:

"0 for heap file, 1 for FreeSpaceMap, and 2 for VisibilityMap".

Any comments?

Good suggestion. I ended up referencing the C file that contains the
"forknumber" definitions, rather than recreating the list in the docs.
I applied the attached patch to head and 9.3.

I ended up applying it to 9.2 as well.

--
Satoshi Nagayasu <snaga@uptime.jp>
Uptime Technologies, LLC. http://www.uptime.jp

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs