1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Make relhasrules and relhastriggers work like relhasindex, namely we let

VACUUM reset them to false rather than trying to clean 'em up during DROP.
This commit is contained in:
Tom Lane
2008-11-10 00:49:37 +00:00
parent e4718f2c9e
commit c5451c22e3
7 changed files with 67 additions and 43 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.127 2008/11/02 01:45:27 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.128 2008/11/10 00:49:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -463,10 +463,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt,
*/
if (!vacstmt->vacuum)
{
vac_update_relstats(RelationGetRelid(onerel),
vac_update_relstats(onerel,
RelationGetNumberOfBlocks(onerel),
totalrows, hasindex,
InvalidTransactionId);
totalrows, hasindex, InvalidTransactionId);
for (ind = 0; ind < nindexes; ind++)
{
@ -474,10 +473,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt,
double totalindexrows;
totalindexrows = ceil(thisdata->tupleFract * totalrows);
vac_update_relstats(RelationGetRelid(Irel[ind]),
vac_update_relstats(Irel[ind],
RelationGetNumberOfBlocks(Irel[ind]),
totalindexrows, false,
InvalidTransactionId);
totalindexrows, false, InvalidTransactionId);
}
/* report results to the stats collector, too */