Mark internal messages as no longer translatable
authorAlvaro Herrera
Tue, 16 May 2023 09:47:25 +0000 (11:47 +0200)
committerAlvaro Herrera
Tue, 16 May 2023 09:47:25 +0000 (11:47 +0200)
The problem that these messages protect against can only occur because
a corrupted hash spill file was written, i.e., a Postgres bug.  There's
no reason to have them as translatable.

Backpatch to 15, where these messages were changed by commit c4649cce39a4.

Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20230510175407[email protected]

src/backend/executor/nodeAgg.c

index d1ec337b30230fb81192e4fa3d592f10b6bf9594..2229c7a756f2ae2ff52ae68f042b573c4598311e 100644 (file)
@@ -3003,8 +3003,8 @@ hashagg_batch_read(HashAggBatch *batch, uint32 *hashp)
    if (nread != sizeof(uint32))
        ereport(ERROR,
                (errcode_for_file_access(),
-                errmsg("unexpected EOF for tape %p: requested %zu bytes, read %zu bytes",
-                       tape, sizeof(uint32), nread)));
+                errmsg_internal("unexpected EOF for tape %p: requested %zu bytes, read %zu bytes",
+                                tape, sizeof(uint32), nread)));
    if (hashp != NULL)
        *hashp = hash;
 
@@ -3012,8 +3012,8 @@ hashagg_batch_read(HashAggBatch *batch, uint32 *hashp)
    if (nread != sizeof(uint32))
        ereport(ERROR,
                (errcode_for_file_access(),
-                errmsg("unexpected EOF for tape %p: requested %zu bytes, read %zu bytes",
-                       tape, sizeof(uint32), nread)));
+                errmsg_internal("unexpected EOF for tape %p: requested %zu bytes, read %zu bytes",
+                                tape, sizeof(uint32), nread)));
 
    tuple = (MinimalTuple) palloc(t_len);
    tuple->t_len = t_len;
@@ -3024,8 +3024,8 @@ hashagg_batch_read(HashAggBatch *batch, uint32 *hashp)
    if (nread != t_len - sizeof(uint32))
        ereport(ERROR,
                (errcode_for_file_access(),
-                errmsg("unexpected EOF for tape %p: requested %zu bytes, read %zu bytes",
-                       tape, t_len - sizeof(uint32), nread)));
+                errmsg_internal("unexpected EOF for tape %p: requested %zu bytes, read %zu bytes",
+                                tape, t_len - sizeof(uint32), nread)));
 
    return tuple;
 }