Skip to content

Seed tablesample strategy

Andreas Brandl requested to merge ab-seed-tablesample into master

What does this MR do?

This changes the approximate counting strategy based on TABLESAMPLE to become stable across multiple invocations. Sampling is based on a RNG. We seed the RNG in order to get stable results (unless the table changed between invocations).

For details, see TABLESAMPLE part of https://www.postgresql.org/docs/9.6/sql-select.html.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/58791

Edited by Andreas Brandl

Merge request reports