Re: Re: [BUGS] BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: Re: [BUGS] BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION
Date: 2010-02-17 17:07:34
Message-ID: 28369.1266426454@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-docs pgsql-hackers

Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> I'd like to apply the patch to HEAD and previous releases because
> the issue seems to be a bug in the core. Any comments or objections?

The proposed patch seems quite ugly to me; not only the messy coding,
but the fact that it might return either the segment containing the
XLOG_BACKUP_END record or the next one.

I think an appropriate fix might just be s/XLByteToSeg/XLByteToPrevSeg/,
so that the result is always the segment containing the XLOG_BACKUP_END
record even when the record ends exactly at a segment boundary.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Chris Travers 2010-02-17 17:41:29 Re: BUG #5331: Integer overflow in tmie counter
Previous Message Sivaguru Sankaridurg 2010-02-17 16:10:20 Re: BUG #5332: Installation weirdness

Browse pgsql-docs by date

  From Date Subject
Next Message Greg Smith 2010-02-18 08:11:21 Hot Standby documentation updates
Previous Message Takahiro Itagaki 2010-02-17 08:43:19 Re: Re: [BUGS] BUG #4566: pg_stop_backup() reports incorrect STOP WAL LOCATION

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-02-17 17:39:12 Re: codlin_month is up and complain - PL/Python crash
Previous Message Tom Lane 2010-02-17 16:26:00 Re: codlin_month is up and complain - PL/Python crash