From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Subject: | review:tracking temporary files in pg_stat_database |
Date: | 2012-01-19 12:05:32 |
Message-ID: | CAFj8pRCO3FLhytV4GcQV6N1K9QokCxMYvWtHNVSykKmhxJHxAQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2012-01-19 13:31:13 | Re: IDLE in transaction introspection |
Previous Message | Heikki Linnakangas | 2012-01-19 11:19:11 | Re: WIP patch: Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation |