Content-Length: 255150 | pFad | http://github.com/postgrespro/postgres/commit/152c94632f1ece90fccc87ff1fabe809a89e3024

E3 Add vacuum_delay_point call in compute_index_stats's per-sample-row l… · postgrespro/postgres@152c946 · GitHub
Skip to content

Commit 152c946

Browse files
committed
Add vacuum_delay_point call in compute_index_stats's per-sample-row loop.
Slow functions in index expressions might cause this loop to take long enough to make it worth being cancellable. Probably it would be enough to call CHECK_FOR_INTERRUPTS here, but for consistency with other per-sample-row loops in this file, let's use vacuum_delay_point. Report and patch by Jeff Janes. Back-patch to all supported branches.
1 parent 6997f22 commit 152c946

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/commands/analyze.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ compute_index_stats(Relation onerel, double totalrows,
679679
{
680680
HeapTuple heapTuple = rows[rowno];
681681

682+
vacuum_delay_point();
683+
682684
/*
683685
* Reset the per-tuple context each time, to reclaim any cruft
684686
* left behind by evaluating the predicate or index expressions.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/152c94632f1ece90fccc87ff1fabe809a89e3024

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy