Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-08-29 Thread Fujii Masao
On Fri, Aug 26, 2016 at 10:03 PM, Fujii Masao wrote: > On Wed, Mar 23, 2016 at 7:04 PM, Pavan Deolasee > wrote: >> >> >> On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier >> wrote: >>> >>> >>> + /* >>> +*

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-08-26 Thread Fujii Masao
On Wed, Mar 23, 2016 at 7:04 PM, Pavan Deolasee wrote: > > > On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier > wrote: >> >> >> + /* >> +* Compute targetRecOff. It should typically be greater than short >> +* page-header

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-04-05 Thread Craig Ringer
On 1 April 2016 at 21:30, Craig Ringer wrote: > I'll attach the new testcase once I either get it to reproduce this bug or > give up and leave the basic xlogdump testcase alone. > I had another bash at this and I still can't reproduce it on master using the giant commit

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-04-01 Thread Craig Ringer
On 31 March 2016 at 16:13, Andres Freund wrote: > It's probably easier to just generate a humongous commit record. You can > do so by having a *lot* of subtransactions. Relatively easy to do with > plpgsql by creating them in a loop (SELECT txid_current() in EXCEPTION >

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-31 Thread Andres Freund
On 2016-03-31 09:41:46 +0530, Pavan Deolasee wrote: > On Thu, Mar 31, 2016 at 6:27 AM, Craig Ringer wrote: > > > > > > Can you describe the process used to generate the sample WAL segment? > > > > > Shame that I can't find the sql file used to create the problematic WAL >

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-30 Thread Pavan Deolasee
On Thu, Mar 31, 2016 at 6:27 AM, Craig Ringer wrote: > > > Can you describe the process used to generate the sample WAL segment? > > Shame that I can't find the sql file used to create the problematic WAL segment. But this is what I did. I wrote a plpgsql function which

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-30 Thread Craig Ringer
On 23 March 2016 at 18:04, Pavan Deolasee wrote: > > > On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier < > michael.paqu...@gmail.com> wrote: > >> >> + /* >> +* Compute targetRecOff. It should typically be greater than short >> +* page-header since

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-30 Thread Craig Ringer
On 23 March 2016 at 18:04, Pavan Deolasee wrote: > > > On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier < > michael.paqu...@gmail.com> wrote: > >> >> + /* >> +* Compute targetRecOff. It should typically be greater than short >> +* page-header since

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-30 Thread Michael Paquier
On Mon, Mar 28, 2016 at 10:15 PM, Andres Freund wrote: > It's definitely too late for that; they're going to be wrapped in a > couple hours. I have added this patch to the next CF so as we do not lose track of this bug: https://commitfest.postgresql.org/10/593/ -- Michael

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-28 Thread Andres Freund
On 2016-03-28 13:21:41 +0530, Pavan Deolasee wrote: > On Wed, Mar 23, 2016 at 6:16 PM, Michael Paquier > wrote: > > > > > > > I'd just add dots at the end of the sentences in the comment blocks > > because that's project style, but I'm being picky, except that the > >

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-28 Thread Pavan Deolasee
On Wed, Mar 23, 2016 at 6:16 PM, Michael Paquier wrote: > > > I'd just add dots at the end of the sentences in the comment blocks > because that's project style, but I'm being picky, except that the > logic looks quite good. > Since this is a bug affecting all stable

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-23 Thread Michael Paquier
On Wed, Mar 23, 2016 at 7:04 PM, Pavan Deolasee wrote: > > > On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier > wrote: >> >> >> + /* >> +* Compute targetRecOff. It should typically be greater than short >> +* page-header

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-23 Thread Pavan Deolasee
On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier wrote: > > + /* > +* Compute targetRecOff. It should typically be greater than short > +* page-header since a valid record can't , but can also be zero > when > +* caller has supplied a

Re: [HACKERS] pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

2016-03-23 Thread Michael Paquier
On Wed, Mar 23, 2016 at 3:43 PM, Pavan Deolasee wrote: > While investigating some issue, I found that pg_xlogdump fails to dump > contents from a WAL file if the file has continuation data from previous WAL > record and the data spans more than one page. In such cases, >