Re: Strange path from pgarch_readyXlog()

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Strange path from pgarch_readyXlog()
Date: 2021-12-29 20:50:56
Message-ID: CE279D35-7AC3-4615-94BB-C0F03CA11609@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/29/21, 12:22 PM, "Thomas Munro" <thomas(dot)munro(at)gmail(dot)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;

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-12-29 21:04:12 Re: Strange path from pgarch_readyXlog()
Previous Message Andres Freund 2021-12-29 20:48:30 Re: Add Boolean node