Re: should xlog_outdesc modify its argument?

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Mark Dilger <hornschnorter(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: should xlog_outdesc modify its argument?
Date: 2016-09-28 06:25:01
Message-ID: 332b40f5-686c-eb3a-8c72-f7438ee5036d@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-09-28 06:30:00 Re: Transactions involving multiple postgres foreign servers
Previous Message Amit Langote 2016-09-28 05:34:13 Re: Some information about the small portion of source code of postgreSQL