Thread: rm_desc patch

rm_desc patch

From
Qingqing Zhou
Date:

This patch basically does two things: (1) call rm_desc() after redo error;
(2) change ABC_desc() to use StringInfo. A thinko in gist_desc() is also
fixed.

Per discussion with Tom,

Regards,
Qingqing

---

Sample output:
[qqzhou@amd64 pginstall]$ postmaster -Ddata
LOG:  database system was interrupted while in recovery at 2006-03-22
17:24:04 CST
HINT:  This probably means that some data is corrupted and you will have
to use the last backup for recovery.
LOG:  checkpoint record is at 0/C784350
LOG:  redo record is at 0/C784350; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 973; next OID: 32798
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system was not properly shut down; automatic recovery in
progress
LOG:  redo starts at 0/C7843A0
PANIC:  -- some redo complain --
CONTEXT:  redo insert: rel 1663/16384/16418; tid 872/1
LOG:  startup process (PID 3213) was terminated by signal 6
LOG:  aborting startup due to startup process failure


Attachment

Re: rm_desc patch

From
Tom Lane
Date:
Qingqing Zhou <zhouqq@cs.toronto.edu> writes:
> This patch basically does two things: (1) call rm_desc() after redo error;
> (2) change ABC_desc() to use StringInfo. A thinko in gist_desc() is also
> fixed.

Applied with minor corrections --- mostly, being careful to pfree the
temporary StringInfos so we don't have an indefinite memory leak during
xlog replay.

            regards, tom lane

Re: rm_desc patch

From
"Qingqing Zhou"
Date:
"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> Applied with minor corrections --- mostly, being careful to pfree the
> temporary StringInfos so we don't have an indefinite memory leak during
> xlog replay.
>

Right. By the way, your worry about buffer overflow is proved in
xact_desc_commit()/xact_desc_abort().

Regards,
Qingqing