From 2d46f0e613e4c147643d8b755fb7d4ea7d710311 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 13 Oct 2004 22:22:03 +0000 Subject: 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. --- contrib/pgstattuple/pgstattuple.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 94160605dc7..31de26aa3fe 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -1,5 +1,5 @@ /* - * $Header: /cvsroot/pgsql/contrib/pgstattuple/pgstattuple.c,v 1.12 2003/08/04 00:43:11 momjian Exp $ + * $Header: /cvsroot/pgsql/contrib/pgstattuple/pgstattuple.c,v 1.12.4.1 2004/10/13 22:22:00 tgl Exp $ * * Copyright (c) 2001,2002 Tatsuo Ishii * @@ -137,6 +137,9 @@ pgstattuple_real(Relation rel) /* 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; @@ -147,6 +150,8 @@ pgstattuple_real(Relation rel) 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 -- cgit v1.2.3