Skip to content

Conversation

@hlinnaka
Copy link
Contributor

@hlinnaka hlinnaka commented Feb 9, 2022

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.

@hlinnaka hlinnaka force-pushed the fix-cluster-size-limit branch from 27e8e07 to 159ca3a Compare February 9, 2022 13:26
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.

Fixes neondatabase/neon#1233
@hlinnaka hlinnaka force-pushed the fix-cluster-size-limit branch from 159ca3a to 387ef06 Compare February 9, 2022 13:26
hlinnaka added a commit to neondatabase/neon that referenced this pull request Feb 9, 2022
@hlinnaka hlinnaka merged commit 387ef06 into main Feb 9, 2022
@hlinnaka hlinnaka deleted the fix-cluster-size-limit branch February 9, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants