From: Christoph Berg Date: Fri, 7 Jun 2024 11:32:55 +0000 (+0200) Subject: Move "number of chunks" to TOAST message X-Git-Tag: REL_17_0~2 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=40dcfd17a4af5796782ab6ac681bad824c2076cd;p=pg_filedump.git Move "number of chunks" to TOAST message No reason to waste two separate lines on this. --- diff --git a/decode.c b/decode.c index 7446bd5..37f723f 100644 --- a/decode.c +++ b/decode.c @@ -1382,16 +1382,15 @@ ReadStringFromToast(const char *buffer, #else toast_ext_size = toast_ptr.va_extsize; #endif + num_chunks = (toast_ext_size - 1) / TOAST_MAX_CHUNK_SIZE + 1; printf(" TOAST value. Raw size: %8d, external size: %8d, " - "value id: %6d, toast relation id: %6d\n", + "value id: %6d, toast relation id: %6d, chunks: %6d\n", toast_ptr.va_rawsize, toast_ext_size, toast_ptr.va_valueid, - toast_ptr.va_toastrelid); - - num_chunks = (toast_ext_size - 1) / TOAST_MAX_CHUNK_SIZE + 1; - printf(" Number of chunks: %d\n", num_chunks); + toast_ptr.va_toastrelid, + num_chunks); /* Open TOAST relation file */ toast_relation_path = strdup(fileName); diff --git a/expected/toast.out b/expected/toast.out index 084abb4..94f2f4e 100644 --- a/expected/toast.out +++ b/expected/toast.out @@ -86,21 +86,17 @@ COPY: short inline xxx Item 2 -- Length: 256 Offset: 7888 (0x1ed0) Flags: NORMAL COPY: long inline uncompressed xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Item 3 -- Length: 64 Offset: 7824 (0x1e90) Flags: NORMAL - TOAST value. Raw size: 2804, external size: 2800, value id: ....., toast relation id: ..... - Number of chunks: 2 + TOAST value. Raw size: 2804, external size: 2800, value id: ....., toast relation id: ....., chunks: 2 COPY: external uncompressed 0123456789 Item 4 -- Length: 107 Offset: 7712 (0x1e20) Flags: NORMAL COPY: inline compressed pglz 0123456789 Item 5 -- Length: 67 Offset: 7640 (0x1dd8) Flags: NORMAL - TOAST value. Raw size: 280004, external size: 3226, value id: ....., toast relation id: ..... - Number of chunks: 2 + TOAST value. Raw size: 280004, external size: 3226, value id: ....., toast relation id: ....., chunks: 2 COPY: extended compressed pglz 0123456789 Item 6 -- Length: 90 Offset: 7544 (0x1d78) Flags: NORMAL COPY: inline compressed lz4 0123456789 Item 7 -- Length: 66 Offset: 7472 (0x1d30) Flags: NORMAL - TOAST value. Raw size: 700004, external size: 2772, value id: ....., toast relation id: ..... - Number of chunks: 2 - + TOAST value. Raw size: 700004, external size: 2772, value id: ....., toast relation id: ....., chunks: 2 COPY: extended compressed lz4 0123456789