Re: Verified fix for Bug 4137

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Verified fix for Bug 4137
Date: 2008-05-09 14:37:12
Message-ID: 48246198.3000500@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Simon Riggs wrote:
> if (restartWALFileName)
> {
> + /*
> + * Don't do cleanup if the restartWALFileName provided
> + * is later than the xlog file requested. This is an error
> + * and we must not remove these files from archive.
> + * This shouldn't happen, but better safe than sorry.
> + */
> + if (strcmp(restartWALFileName, nextWALFileName) > 0)
> + return false;
> +
> strcpy(exclusiveCleanupFileName, restartWALFileName);
> return true;
> }

I committed this sanity check into pg_standy, though it really shouldn't
happen, but it just occurred to me that the most likely reason for that
to happen is probably that the user has screwed up his restore_command
line, mixing up the %p and %r arguments. Should we make that an error
instead of just not doing the cleanup?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-05-09 14:39:33 Re: [HACKERS] [NOVICE] encoding problems
Previous Message Heikki Linnakangas 2008-05-09 14:31:43 Re: Verified fix for Bug 4137