HOT: Incomplete issues

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: HOT: Incomplete issues
Date: 2007-06-26 10:40:48
Message-ID: 20070626175158.6A34.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I'm testing HOT patches, applying to CVS HEAD.
http://archives.postgresql.org/pgsql-patches/2007-05/msg00065.php
I found a few issues in the patch. Some of them might already have
been fixed, but anyway I'll report them for information.

I don't see any problems excluding the following in TPC-C workload
and pgbench power test.

- MVCC-safe CLUSTER
When I clustered a table with HOT-updated tuples, I saw the following error
message. The HOT patch latest posted does not support MVCC-safe CLUSTER.
| ERROR: unexpected HeapTupleSatisfiesVacuum result

- Number of unremovable tuples reported by VACUUM VERBOSE
HOT-updated tuples (HEAPTUPLE_DEAD_CHAIN) are counted as "keeped" and
VACUUM VERBOSE prints them as "cannot be removed yet". However, we can
actually remove them. We can reuse the data space of HOT-updated tuples,
but need to keep their item pointers. We'd better to show them as two
different messages -- for example, unremovable tuples and unreusable
item pointers.

- ANALYZE and statistics of dead rows
Since redirected or redirect-dead item pointers are counted as "dead rows",
we overestimates the number of dead rows. It confuses statistics and
ill-affects to autovacuums; If autovacuum does ANALYZE, the number of
dead tuples looks suddenly increased and it triggers unnecessary VACUUMs
by the next autovacuum.

- Trigger of auto-analyze
HOT updates does not affect pgstat_info->trans->tuples_inserted/deleted
fields, so auto-analyze will be triggered less frequently. However,
it might be rather proper because HOT-updates means the indexed columns
were not changed in the updates. If the values used in WHERE-clauses,
we don't have to re-analyze the relation.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2007-06-26 11:11:41 Re: Frustrating issue with PGXS
Previous Message Simon Riggs 2007-06-26 05:37:01 Re: Waiting for archive to complete