Hello This is review of Tomas' patch for counting of using temporary files:
* This patch was cleanly applied and code was compiled * All 128 tests passed * There are own regress tests, but usually pg_stat_* functions are not tested * There is adequate documentation * This patch was requested http://archives.postgresql.org/pgsql-hackers/2011-12/msg00950.php * Code following postgresql coding standards * Code works postgres=# create table xx(a int); CREATE TABLE postgres=# insert into xx select (random()*100000)::int from generate_series(1,200000); INSERT 0 200000 postgres=# \d+ xx; Table "public.xx" Column | Type | Modifiers | Storage | Stats target | Description --------+---------+-----------+---------+--------------+------------- a | integer | | plain | | Has OIDs: no postgres=# \dt+ xx; List of relations Schema | Name | Type | Owner | Size | Description --------+------+-------+-------+---------+------------- public | xx | table | pavel | 7104 kB | (1 row) postgres=# set work_mem to '1MB'; SET postgres=# select pg_stat_get_db_temp_bytes(12899),pg_stat_get_db_temp_files(12899); pg_stat_get_db_temp_bytes | pg_stat_get_db_temp_files ---------------------------+--------------------------- 9889486560 | 4103 (1 row) postgres=# select * from xx order by 1; postgres=# select pg_stat_get_db_temp_bytes(12899),pg_stat_get_db_temp_files(12899); pg_stat_get_db_temp_bytes | pg_stat_get_db_temp_files ---------------------------+--------------------------- 9892288224 | 4104 (1 row) This patch is ready for commit Regards Pavel Stehule -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers