Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf22e436

Browse files
committed
Add missing CommandCounterIncrement() in stats import functions.
Reported-by: Alexander LakhinDiscussion:https://postgr.es/m/98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com
1 parent30d47ec commitf22e436

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

‎src/backend/statistics/attribute_stats.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ upsert_pg_statistic(Relation starel, HeapTuple oldtup,
752752
}
753753

754754
heap_freetuple(newtup);
755+
756+
CommandCounterIncrement();
755757
}
756758

757759
/*
@@ -762,6 +764,7 @@ delete_pg_statistic(Oid reloid, AttrNumber attnum, bool stainherit)
762764
{
763765
Relationsd=table_open(StatisticRelationId,RowExclusiveLock);
764766
HeapTupleoldtup;
767+
boolresult= false;
765768

766769
/* Is there already a pg_statistic tuple for this attribute? */
767770
oldtup=SearchSysCache3(STATRELATTINH,
@@ -773,12 +776,14 @@ delete_pg_statistic(Oid reloid, AttrNumber attnum, bool stainherit)
773776
{
774777
CatalogTupleDelete(sd,&oldtup->t_self);
775778
ReleaseSysCache(oldtup);
776-
table_close(sd,RowExclusiveLock);
777-
return true;
779+
result= true;
778780
}
779781

780782
table_close(sd,RowExclusiveLock);
781-
return false;
783+
784+
CommandCounterIncrement();
785+
786+
returnresult;
782787
}
783788

784789
/*

‎src/backend/statistics/relation_stats.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ relation_statistics_update(FunctionCallInfo fcinfo, int elevel)
171171
/* release the lock, consistent with vac_update_relstats() */
172172
table_close(crel,RowExclusiveLock);
173173

174+
CommandCounterIncrement();
175+
174176
returnresult;
175177
}
176178

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp