Change the unit of cluster size limit GUC to MB, and other fixes. #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The GUC is a 32-bit integer, so if the base unit is bytes, the max
limit you can set is only 2 GB. Furthermore, the web console assumed
that the unit is in MB, and set it to 10000 meaning 10 GB, but in
reality it was set to just 10 kB.
Remove the WARNINGs related to cluster size limit. That was probably
supposed to be DEBUG5 or something, because it's extremely noisy
currently. You get the WARNING for every block when a relation is
extended.
Some kind of a WARNING when you approach the limit would make sense,
but it's difficult to do in a sensible way with WARNINGs from the
server. Firstly, most applications will ignore WARNINGs, in which case
they don't accomplish anything. If an application forwards them to the
user, that's not great either unless the application user happens to
be the DBA. If you're lucky, the WARNINGs end up in an application log
and the DBA is alerted, but printing the message for every relation
extension is too noisy for that too. An email alert would probably be
best, outside Postgres.
Also don't enforce the limit when extending a temporary or unlogged
relation. They don't count towards the cluster size limit, so it seems
weird to error out on them. And reword the error message a bit.