pg_diffix
pg_diffix copied to clipboard
bucket_seed should be a member of Bucket
Also compute_bucket_seed is out of place in anonymization.c. It should be moved to common.c.
Also compute_bucket_seed is out of place in anonymization.c. It should be moved to common.c.
Why is it out of place in anonymization.c?
Even if we don't want it there, common.c doesn't seem like the right place for it. Maybe noise_layers.c or bucket.c?
Why is it out of place in anonymization.c?
anonymization.c should not reference Bucket or BucketDesc. In my view those are runtime concepts and the rewriter is a "compile" time process.
common.c doesn't seem like the right place for it
I saw that eval_low_count is there, which is used by bucket scan and star bucket. The function will be needed in the same places because that is where we instantiate buckets. I'm not strictly against moving it, but it felt a bit awkward.
If computing the seed multiple times is costly, worth implementing for the sake of speedup.
Low priority because it has little performance gains.