Re: starting postgres with an empty px_xlog folder

From: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
To: Mike Broers <mbroers(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: starting postgres with an empty px_xlog folder
Date: 2012-06-23 13:36:34
Message-ID: CA+h6Ahj64cukXK2cXaO+J6f4mW68X4PQBsws_gYP1rtwVTJoMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>
> 2012-06-23 06:06:04 CDT [18612]: [2-1] user=,db= LOG: could not open file
> "pg_xlog/0000000100000A0100000040" (log file 2561, segment 64): No such
> file or
> directory

Don't do pg_resetlogs. If you have archives, please find for the file which
has pointed in logs copy it to $PGDATA/pg_xlog location and start the
server. Sometime, server will throw the sequence of files like 41,42....,
not existing, you need to copy all of them to pg_xlog location and start it.

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

On Sat, Jun 23, 2012 at 6:19 PM, Mike Broers <mbroers(at)gmail(dot)com> wrote:

> I was able to duplicate the error in a test environment and get the
> database started back up wtih the pg_resetxlog $PGDATA command, but i am
> concerned about the fallout and not sure if i need to use any of the option
> switches. We also have archived log files up to the point of server
> shutdown if that provides a better option.
>
>
>
> On Sat, Jun 23, 2012 at 7:01 AM, Mike Broers <mbroers(at)gmail(dot)com> wrote:
>
>> Hello,
>>
>> We shut down our postgres 8.3 server last night cleanly for some hosted
>> services maintenance. When we got our server back, it didnt have the
>> pg_xlog mount with files and now when we start the server, it complains:
>>
>> 2012-06-23 06:06:04 CDT [18612]: [1-1] user=,db= LOG: database system
>> was shut down at 2012-06-22 23:56:16 CDT
>>
>> 2012-06-23 06:06:04 CDT [18612]: [3-1] user=,db= LOG: invalid primary
>> checkpoint record
>> 2012-06-23 06:06:04 CDT [18612]: [4-1] user=,db= LOG: could not open
>> file "pg_xlog/0000000100000A0100000040" (log file 2561, segment 64): No
>> such file or
>> directory
>> 2012-06-23 06:06:04 CDT [18612]: [5-1] user=,db= LOG: invalid secondary
>> checkpoint record
>> 2012-06-23 06:06:04 CDT [18612]: [6-1] user=,db= PANIC: could not locate
>> a valid checkpoint record
>> 2012-06-23 06:06:04 CDT [18609]: [1-1] user=,db= LOG: startup process
>> (PID 18612) was terminated by signal 6: Aborted
>> 2012-06-23 06:06:04 CDT [18609]: [2-1] user=,db= LOG: aborting startup
>> due to startup process failure
>>
>>
>> Since we had a clean shut down is there an easy or relatively clean way
>> to start back up? the pg_xlog folder is there, just with no files. i
>> wouldnt think it would be needed for a clean restart.
>>
>>
>>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ray Stell 2012-06-23 14:45:24 Re: starting postgres with an empty px_xlog folder
Previous Message Mike Broers 2012-06-23 12:49:25 Re: starting postgres with an empty px_xlog folder