diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-10-13 22:22:22 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-10-13 22:22:22 +0000 |
| commit | 78c0692b159dccf56853107fb4513225decbbd85 (patch) | |
| tree | 491c86799f5f2ec09637c98a94e1000851a95cb7 /contrib/pgstattuple/pgstattuple.c | |
| parent | 8a9b331c323c6b6dfe97d7e05939f2518b98f5b0 (diff) | |
Repair possible failure to update hint bits back to disk, per
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php.
I plan a more permanent fix in HEAD, but for the back branches it seems
best to just touch the places that actually have a problem.
Diffstat (limited to 'contrib/pgstattuple/pgstattuple.c')
| -rw-r--r-- | contrib/pgstattuple/pgstattuple.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 51cab46a1e7..bd7cce53b90 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -1,5 +1,5 @@ /* - * $Header: /cvsroot/pgsql/contrib/pgstattuple/pgstattuple.c,v 1.9 2002/09/04 20:31:08 momjian Exp $ + * $Header: /cvsroot/pgsql/contrib/pgstattuple/pgstattuple.c,v 1.9.2.1 2004/10/13 22:22:20 tgl Exp $ * * Copyright (c) 2001,2002 Tatsuo Ishii * @@ -103,6 +103,9 @@ pgstattuple(PG_FUNCTION_ARGS) /* scan the relation */ while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) { + uint16 sv_infomask; + + sv_infomask = tuple->t_data->t_infomask; if (HeapTupleSatisfiesNow(tuple->t_data)) { tuple_len += tuple->t_len; @@ -113,6 +116,8 @@ pgstattuple(PG_FUNCTION_ARGS) dead_tuple_len += tuple->t_len; dead_tuple_count++; } + if (sv_infomask != tuple->t_data->t_infomask) + SetBufferCommitInfoNeedsSave(scan->rs_cbuf); /* * To avoid physically reading the table twice, try to do the |
