Thread: WAL archiving not starting at the beginning

WAL archiving not starting at the beginning

From
Michael Angeletti
Date:
Hi pg devs, fellow pg users

I'm Michael, and this is my first post here. 

I asked this question last night:


which details the problem (or not?) I'm having. The gist of it is that Postgres is not archiving the first WAL segments for my cluster. You'll note that I changed the wal_level from "minimal" to "hot_standby" at the same time as I turned archiving on. I'm not sure if A) that's a no-no (changing the wal_level after a new cluster has started once), B) it's a bug/problem to have my archives starting at the 6th log, despite the first 5 still being in pg_xlog, C) if my switching of wal_level has anything to do with the issue, and D) if I need to start over with a fresh database or something, in order to remedy the issue. 


Thanks
Michael

Re: WAL archiving not starting at the beginning

From
Albe Laurenz
Date:
Michael Angeletti wrote:
> I'm Michael, and this is my first post here.
> 
> I asked this question last night:
> 
> 
> http://dba.stackexchange.com/questions/45077
> 
> 
> which details the problem (or not?) I'm having. The gist of it is that Postgres is not archiving the
> first WAL segments for my cluster. You'll note that I changed the wal_level from "minimal" to
> "hot_standby" at the same time as I turned archiving on. I'm not sure if A) that's a no-no (changing
> the wal_level after a new cluster has started once), B) it's a bug/problem to have my archives
> starting at the 6th log, despite the first 5 still being in pg_xlog, C) if my switching of wal_level
> has anything to do with the issue, and D) if I need to start over with a fresh database or something,
> in order to remedy the issue.

I can't answer the question without digging deeper, but I
wonder why you care.  It is not necessary to have all WAL
segments archived, but only the ones after your first base backup.
And you won't be able to make a base backup before you turn
wal_level to "archive" or higher.

Yours,
Laurenz Albe