| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Improving Visibility of Temporary Table Usage |
| Date: | 2026-06-26 20:13:22 |
| Message-ID: | CAN4CZFPHON=y6m-LmVJdokUiRV4GMEAzhgXbdTzK6HbYH6YQAQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
+ <para>
+ Number of temporary table blocks read from disk in this database.
+ </para></entry>
The counters also seem to include index blocks, is that intended? If
yes, then the wording should indicate that. E.g.
CREATE TEMP TABLE t(a int);
INSERT INTO t SELECT generate_series(1,100000);
CREATE INDEX t_a_idx ON t(a);
SET enable_seqscan = off;
SET enable_bitmapscan = off;
SELECT count(a) FROM t WHERE a BETWEEN 1 AND 50000;
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>temp_tables</structfield> <type>bigint</type>
+ </para>
+ <para>
+ Number of temporary tables created in this database.
+ </para></entry>
+ </row>
Similar question: it currently also includes vacuum/cluster/create
index/alter table alter column. Is that intended?
CREATE TEMP TABLE t(a int);
INSERT INTO t SELECT g FROM generate_series(1,100) g;
VACUUM FULL t;
CREATE INDEX idx ON t(a);
CLUSTER t USING idx;
ALTER TABLE t ALTER COLUMN a TYPE bigint;
SELECT pg_stat_force_next_flush();
SELECT temp_tables FROM pg_stat_database WHERE datname=current_database();
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-06-26 20:19:12 | Re: More jsonpath methods: translate, split, join |
| Previous Message | Robert Haas | 2026-06-26 20:05:55 | Re: Why clearing the VM doesn't require registering vm buffer in wal record |