From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Gist Recovery testing |
Date: | 2005-06-12 17:37:03 |
Message-ID: | Pine.GSO.4.63.0506122131250.14456@ra.sai.msu.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
There is a problem with gist_xlog_cleanup function - we have no
information about user defined functions and indices, because postmaster
doesn't started yet and system catalog isn't available. For btree it's not
necessary, but for GiST we certainly need them. Is't possible to add
additional hook after clean up stage, so we could use it to complete
incompleted inserts ? Any suggestions ?
Oleg
On Fri, 10 Jun 2005, Tom Lane wrote:
> Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
>> Ok, I already realized WAL in GiST and tested with online backup. It works.
>> Now I need test it on recovery after crash (power loss etc) and there is a
>> problem in GiST with incompleted inserts, I hope, I resolved it, but this
>> problem, I think, has the same nature as incompleted splits in btree code. For
>> solving, btree xlog code uses stack of incompleted splits and if they leaves
>> incompleted, btree_xlog_cleanup function completes them. I make use similar
>> idea, but I can't reproduce situation when xlog_cleanup makes some useful work
>> except just looks at void stack. So question: how is it possible to reproduce
>> desired behaviour?
>
> It's not very easy; you have to arrange for the WAL history to end
> between the two action records that you are interested in. What I'd
> suggest is
> - run test backend under GDB, set breakpoint between
> making log entry for first split step and entry for second.
> - let it reach the breakpoint
> - in another backend, commit some unrelated transaction to
> force XLOG buffers to disk
> - in GDB, "kill -9" to prevent test backend from proceeding
>
> If you want to trace through the recovery as well, the best bet might be
> to temporarily add a "sleep(30)" near the beginning of StartupXlog so
> that you have time to reattach to the recovery process.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-06-12 17:57:38 | Re: Gist Recovery testing |
Previous Message | Tom Lane | 2005-06-12 17:21:31 | Re: creating WITH HOLD cursors using SPI |