Re: Strange path from pgarch_readyXlog() - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: Strange path from pgarch_readyXlog()
Date
Msg-id CE279D35-7AC3-4615-94BB-C0F03CA11609@amazon.com
Whole thread Raw
In response to Strange path from pgarch_readyXlog()  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Strange path from pgarch_readyXlog()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 12/29/21, 12:22 PM, "Thomas Munro" <thomas.munro@gmail.com> wrote:
> Isn't this a corrupted pathname?
>
> 2021-12-29 03:39:55.708 CST [79851:1] WARNING:  removal of orphan
> archive status file
> "pg_wal/archive_status/000000010000000000000003.00000028.backup000000010000000000000004.ready"
> failed too many times, will try again later

I bet this was a simple mistake in beb4e9b.

Nathan

diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c
index 434939be9b..b5b0d4e12f 100644
--- a/src/backend/postmaster/pgarch.c
+++ b/src/backend/postmaster/pgarch.c
@@ -113,7 +113,7 @@ static PgArchData *PgArch = NULL;
  * is empty, at which point another directory scan must be performed.
  */
 static binaryheap *arch_heap = NULL;
-static char arch_filenames[NUM_FILES_PER_DIRECTORY_SCAN][MAX_XFN_CHARS];
+static char arch_filenames[NUM_FILES_PER_DIRECTORY_SCAN][MAX_XFN_CHARS + 1];
 static char *arch_files[NUM_FILES_PER_DIRECTORY_SCAN];
 static int arch_files_size = 0;


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add Boolean node
Next
From: Tom Lane
Date:
Subject: Re: Strange path from pgarch_readyXlog()