On Wednesday, November 21, 2012 11:36 PM Heikki Linnakangas wrote: > On 20.11.2012 15:33, Amit Kapila wrote: > > Defect-2: > > 1. start primary A > > 2. start standby B following A > > 3. start cascade standby C following B. > > 4. Start another standby D following C. > > 5. Execute the following commands in the primary A. > > create table tbl(f int); > > insert into tbl values(generate_series(1,1000)); > > 6. Promote standby B. > > 7. Execute the following commands in the primary B. > > insert into tbl values(generate_series(1001,2000)); > > insert into tbl values(generate_series(2001,3000)); > > > > The following logs are observed on standby C: > > > > LOG: restarted WAL streaming at position 0/7000000 on tli 2 > > ERROR: requested WAL segment 000000020000000000000007 has > > already been removed > > LOG: record with zero length at 0/7028190 > > LOG: record with zero length at 0/7048540 > > LOG: out-of-sequence timeline ID 1 (after 2) in log segment > > 000000020000000000000007, offset 0 > > I propose the attached patch (against 9.2) to fix that. This should be > backpatched to 9.0, where standby_mode was introduced. The code was the > same in 8.4, too, but AFAICS there was no problem there because 8.4 > never tried to re-open the same WAL segment after replaying some of it.
Fixed. With Regards, Amit Kapila. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers