Re: Online base backup from the hot-standby - Mailing list pgsql-hackers
From | Steve Singer |
---|---|
Subject | Re: Online base backup from the hot-standby |
Date | |
Msg-id | BLU0-SMTP7467A0BBFE563ED7A75CDE8E870@phx.gbl Whole thread Raw |
In response to | Re: Online base backup from the hot-standby (Fujii Masao <masao.fujii@gmail.com>) |
Responses |
Re: Online base backup from the hot-standby
Re: Online base backup from the hot-standby |
List | pgsql-hackers |
On 12-01-17 05:38 AM, Fujii Masao wrote: <blockquote cite="mid:CAHGQGwEXK39yByx6Q25u6r-Z4GZg0VEvtw6tvUpLBBvchZEUEw@mail.gmail.com"type="cite"><pre wrap="">On Fri, Jan 13, 2012at 5:02 PM, Fujii Masao <a class="moz-txt-link-rfc2396E" href="mailto:masao.fujii@gmail.com"><masao.fujii@gmail.com></a>wrote: </pre><blockquote type="cite"><pre wrap="">The amount of code changes to allow pg_basebackup to make a backup from the standby seems to be small. So I ended up merging that changes and the infrastructure patch. WIP patch attached. But I'd happy to split the patch again if you want. </pre></blockquote><pre wrap=""> Attached is the updated version of the patch. I wrote the limitations of standby-only backup in the document and changed the error messages. </pre></blockquote><br /> Here is my review of this verison of the patch. I think this patch has been in every CF for 9.2and I feel it is getting close to being committed. The only issue of significants is a crash I encountered while testing,see below. <br /><br /> I am fine with including the pg_basebackup changes in the patch it also makes testing someof the other changes possible.<br /><br /><br /> The documentation updates you have are good<br /><br /> I don't seeany issues looking at the code.<br /><br /><br /><br /> Testing Review<br /> --------------------------------<br /><br/> I encountered this on my first replica (the one based on the master). I am not sure if it is related to this patch,it happened after the pg_basebackup against the replica finished.<br /><br /> TRAP: FailedAssertion("!(((xid) != ((TransactionId)0)))", File: "twophase.c", Line: 1238)<br /> LOG: startup process (PID 12222) was terminated by signal 6:Aborted<br /> LOG: terminating any other active server processes<br /><br /> A little earlier this postmaster had printed.<br/><br /> LOG: restored log file "00000001000000000000001F" from archive<br /> LOG: restored log file "000000010000000000000020"from archive<br /> cp: cannot stat `/usr/local/pgsql92git/archive/000000010000000000000021': Nosuch file or directory<br /> LOG: unexpected pageaddr 0/19000000 in log file 0, segment 33, offset 0<br /> cp: cannotstat `/usr/local/pgsql92git/archive/000000010000000000000021': No such file or directory<br /><br /><br /> I have NOTbeen able to replicate this error and I am not sure exactly what I had done in my testing prior to that point. <br /><br/><br /> In another test run I had<br /><br /> - set full page writes=off and did a checkpoint<br /> - Started the pg_basebackup<br/> - set full_page_writes=on and did a HUP + some database activity that might have forced a checkpoint.<br/><br /> I got this message from pg_basebackup.<br /> ./pg_basebackup -D ../data3 -l foo -h localhost -p 5438<br /> pg_basebackup: could not get WAL end position from server<br /><br /> I point this out because the message isdifferent than the normal "could not initiate base backup: FATAL: WAL generated with full_page_writes=off" thatI normallysee. We might want to add a PQerrorMessage(conn)) to pg_basebackup to print the error details. Since this patchdidn't actually change pg_basebackup I don't think your required to improve the error messages in it. I am just mentioningthis because it came up in testing.<br /><br /><br /> The rest of the tests I did involving changing full_page_writes with/without checkpoints and sighups and promoting the replica seemed to work as expected.<br /><br /><br/><br /><br /><blockquote cite="mid:CAHGQGwEXK39yByx6Q25u6r-Z4GZg0VEvtw6tvUpLBBvchZEUEw@mail.gmail.com" type="cite"><prewrap="">Regards, </pre> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> </pre></blockquote><br />
pgsql-hackers by date: