Re: Cannot start the postgres service

From: Mitesh51 <mit_bca1(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot start the postgres service
Date: 2009-10-15 07:24:32
Message-ID: 25904095.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Let me clarify bit more so I can do thing in proper manner...

I take base backup(full).

at fixed interval I need to take incremental backup and for that...

I use following commands.

psql -U postgres -c "select pg_switch_xlog()"

psql -U postgres -c "SELECT pg_stop_backup()"

after that the WAL file(s) is/are archived & I consider that file as a file
which will be used for backup along with all files exist in the pg_xlog dir.

same approach is mentioned in the
http://www.mkyong.com/database/postgresql-point-in-time-recovery-incremental-backup/

Am I doing things properly??

I know how to restore data from the full backup but havn't done anything to
restore data from the WAL files...Hopefully I will find the way...If u can
emphasize somewhere then it will be a gr8 help :)

Please correct me if I am wrong somewhere :)

Alvaro Herrera-7 wrote:
>
> Mitesh51 wrote:
>
>> I had 2 approach in my mind...to sync up transaction log files with
>> specific
>> full backup
>>
>> 1) to keep only time relavent files in pg_xlog dir and move other files
>> to
>> archive dir with code which is not a good idea as u suggest
>
> Postgres is prepared to (and assumes it can) reuse and delete files in
> pg_xlog. If you need a copy you can use for your own purposes, you MUST
> get it through an archive_command. You MUST NOT fiddle with the files
> in pg_xlog directly.
>
> Also note that your archive_command needs to create a separate copy of
> the file. Hardlinks are not allowed, because the file might get
> rewritten by Postgres later. Moving (mv) the original files is not
> allowed either for the same reason. Postgres will leave the file alone
> until it has been archived, and assumes it can do whatever it pleases
> with it as soon as the archiver has returned success (exit code 0).
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/Cannot-start-the-postgres-service-tp25867194p25904095.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-10-15 09:13:14 Re: could not open process token: error code 5
Previous Message Viktor Rosenfeld 2009-10-15 06:35:20 Can't find documentation for ~=~ operator