Re: Accidental setting of XLogReaderState.private_data ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Accidental setting of XLogReaderState.private_data ?
Date: 2019-04-15 15:06:18
Message-ID: 21321.1555340778@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Antonin Houska <ah(at)cybertec(dot)at> writes:
> StartupDecodingContext() initializes ctx->reader->private_data with ctx, and
> it even does so twice. I couldn't find a place in the code where the
> (LogicalDecodingContext *) pointer is retrieved from the reader, and a simple
> test of logical replication works if the patch below is applied. Thus I assume
> that assignment is a thinko, isn't it?

Hmm. The second, duplicate assignment is surely pointless, but I think
that setting the ctx as the private_data is a good idea. It hardly seems
out of the question that it might be needed in future.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-04-15 15:10:38 Re: Zedstore - compressed in-core columnar storage
Previous Message Tom Lane 2019-04-15 15:00:25 Re: partitioning performance tests after recent patches