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

Commit211d80c

Browse files
committed
Fix stale comment about sample_frac adjustment
A comment was left behind referencing sample rate adjustment removedfrom8ad51b5. So clean that up. While at it also remove the samplerate clamping which should not be necessary without the clamping, andjust check that with an assert.Reported-by: Tom LaneDiscussion:https://postgr.es/m/951485.1672461744%40sss.pgh.pa.us
1 parent4037c5e commit211d80c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎contrib/postgres_fdw/postgres_fdw.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5204,10 +5204,11 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
52045204
sample_frac=targrows /reltuples;
52055205

52065206
/*
5207-
* Ensure the sampling rate is between 0.0 and 1.0, even after the
5208-
* 10% adjustment above. (Clamping to 0.0 is just paranoia.)
5207+
* We should never get sampling rate outside the valid range
5208+
* (between 0.0 and 1.0), because those cases should be covered
5209+
* by the previous branch that sets ANALYZE_SAMPLE_OFF.
52095210
*/
5210-
sample_frac=Min(1.0,Max(0.0,sample_frac));
5211+
Assert(sample_frac>=0.0&&sample_frac <=1.0);
52115212
}
52125213
}
52135214

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp