neon
neon copied to clipboard
pageserver: avoid calculating logical size on shards >0
Only shard zero maintains accurate relation sizes. Currently, other shards calculate their own logical size (which can be smaller than the real one), which is a waste of resources, and results in sending a bogus value back to the safekeeper, which could interfere with backpressure.
Perhaps we should add a safekeeper special case to ignore zero sizes, and then emit zero logical size from all shards >0, that way they can also skip initial logical size calculation task.
We should also avoid exposing the logical size prometheus metric from other shards.