| From: | Markus Wanner <markus(at)bluegap(dot)ch> |
|---|---|
| To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | WAL_DEBUG logs spurious data |
| Date: | 2012-10-11 21:08:46 |
| Message-ID: | 5077355E.50501@bluegap.ch |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
I stumbled across a minor issue in xlog.c:1030: the WAL_DEBUG code block
there passes rdata->data to the rm_desc() methode. However, that's only
the first XLogRecData struct, not the entire XLog record. So the
rm_desc() method effectively reports spurious data for any subsequent part.
Take a commit record with subxacts as an example: during XLogInsert,
Postgres reports the following:
LOG: INSERT @ 0/16F3270: prev 0/16F3234; xid 688; len 16: Transaction -
commit: 2012-10-11 09:31:17.790368-07; subxacts: 3214563816
Note that the xid in subxacts is way off. During recovery from WAL, the
record is logged correctly:
LOG: REDO @ 0/16F3270; LSN 0/16F329C: prev 0/16F3234; xid 688; len 16:
Transaction - commit: 2012-10-11 09:31:17.790368-07; subxacts: 689
Attached is a possible fix.
Regards
Markus Wanner
| Attachment | Content-Type | Size |
|---|---|---|
| wal_debug_fix.diff | text/x-diff | 1.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dimitri Fontaine | 2012-10-11 21:17:57 | Re: Deprecating RULES |
| Previous Message | Tom Lane | 2012-10-11 19:50:06 | Re: Deprecating RULES |