New "blob" re-introduced?

Started by Kyotaro Horiguchialmost 3 years ago4 messages
#1Kyotaro Horiguchi
horikyota.ntt@gmail.com

I noticed that the commit e9960732a9 introduced the following message.

+	if (EndCompressFileHandle(ctx->dataFH) != 0)
+		pg_fatal("could not close blob data file: %m");

It seems that we have removed the terminology "blob(s)" from
user-facing messages by the commit 35ce24c333 (discussion is [1]/messages/by-id/868a381f-4650-9460-1726-1ffd39a270b4@enterprisedb.com).
Shouldn't we use "large object" instead of "blob" in the message?

[1]: /messages/by-id/868a381f-4650-9460-1726-1ffd39a270b4@enterprisedb.com

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

#2Daniel Gustafsson
daniel@yesql.se
In reply to: Kyotaro Horiguchi (#1)
Re: New "blob" re-introduced?

On 24 Feb 2023, at 08:31, Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:

Shouldn't we use "large object" instead of "blob" in the message?

Nice catch, it should be "large object" as per the linked discussion. There
are also a few more like:

-       if (cfclose(ctx->LOsTocFH) != 0)
-               pg_fatal("could not close LOs TOC file: %m");
+       if (EndCompressFileHandle(ctx->LOsTocFH) != 0)
+               pg_fatal("could not close blobs TOC file: %m");

I'll go ahead and fix them, thanks for the report!

--
Daniel Gustafsson

#3Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: Kyotaro Horiguchi (#1)
Re: New "blob" re-introduced?

At Fri, 24 Feb 2023 16:31:27 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in

I noticed that the commit e9960732a9 introduced the following message.

+	if (EndCompressFileHandle(ctx->dataFH) != 0)
+		pg_fatal("could not close blob data file: %m");

It seems that we have removed the terminology "blob(s)" from
user-facing messages by the commit 35ce24c333 (discussion is [1]).
Shouldn't we use "large object" instead of "blob" in the message?

[1] /messages/by-id/868a381f-4650-9460-1726-1ffd39a270b4@enterprisedb.com

Mmm. The following changes of e9960732a9 seem like reverting the
previous commit 35ce24c333...

e9960732a9 @ 2023/2/23:
-	if (cfclose(ctx->dataFH) != 0)
-		pg_fatal("could not close LO data file: %m");
+	/* Close the BLOB data file itself */
+	if (EndCompressFileHandle(ctx->dataFH) != 0)
+		pg_fatal("could not close blob data file: %m");
-	if (cfwrite(buf, len, ctx->LOsTocFH) != len)
-		pg_fatal("could not write to LOs TOC file");
+	if (CFH->write_func(buf, len, CFH) != len)
+		pg_fatal("could not write to blobs TOC file");
..
-	if (cfclose(ctx->LOsTocFH) != 0)
-		pg_fatal("could not close LOs TOC file: %m");
+	if (EndCompressFileHandle(ctx->LOsTocFH) != 0)
+		pg_fatal("could not close blobs TOC file: %m");
35ce24c333 @ 2022/12/5:
-		pg_fatal("could not close blob data file: %m");
+		pg_fatal("could not close LO data file: %m");
...
-	if (cfwrite(buf, len, ctx->blobsTocFH) != len)
-		pg_fatal("could not write to blobs TOC file");
+	if (cfwrite(buf, len, ctx->LOsTocFH) != len)
+		pg_fatal("could not write to LOs TOC file");
...
-		pg_fatal("could not close blob data file: %m");
+		pg_fatal("could not close LO data file: %m");

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

#4Daniel Gustafsson
daniel@yesql.se
In reply to: Kyotaro Horiguchi (#3)
Re: New "blob" re-introduced?

On 24 Feb 2023, at 08:40, Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:

Mmm. The following changes of e9960732a9 seem like reverting the
previous commit 35ce24c333...

Fixed in 94851e4b90, thanks for the report!

--
Daniel Gustafsson