From: | Mark Dilger <hornschnorter(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: should xlog_outdesc modify its argument? |
Date: | 2016-09-28 18:28:40 |
Message-ID: | 6556C264-783E-4355-875C-EF875FCB0280@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Sep 27, 2016, at 11:25 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> On 09/28/2016 02:35 AM, Mark Dilger wrote:
>> The function
>>
>> static void xlog_outdesc(StringInfo buf, XLogReaderState *record);
>>
>> in src/backend/access/transam/xlog.c is called by XLogInsertRecord,
>> and after returning a string describing an XLogRecord, it clears the
>> state data in its XLogReaderState argument. That mixes the read-only
>> semantics of "give me a string that describes this argument" and the
>> read-write semantics of "clear out the value in this argument".
>
> I don't see where the "clears the state data" is happening. Can you elaborate?
My apologies. At the bottom of the function, it calls through the function pointer
RmgrTable[rmid].rm_desc(buf, record);
which is set up to call various *_desc functions. I must have chased through
those function pointers incorrectly, as I can't find the problem now that I am
reviewing all those functions.
Sorry for the noise,
Mark Dilger
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2016-09-28 18:37:47 | Re: Showing parallel status in \df+ |
Previous Message | Petr Jelinek | 2016-09-28 18:23:24 | Re: psql casts aspersions on server reliability |