On Mon, Jun 22, 2020 at 11:56 AM Dilip Kumar <dilipbal...@gmail.com> wrote: > > On Tue, Jun 16, 2020 at 2:37 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > > 8. > > + /* > > + * Start a transaction on stream start, this transaction will be committed > > + * on the stream stop. We need the transaction for handling the buffile, > > + * used for serializing the streaming data and subxact info. > > + */ > > + ensure_transaction(); > > > > I think we need this for PrepareTempTablespaces to set the > > temptablespaces. Also, isn't it required for a cleanup of buffile > > resources at the transaction end? Are there any other reasons for it > > as well? The comment should be a bit more clear for why we need a > > transaction here. > > I am not sure that will it make sense to add a comment here that why > buffile and sharedfileset need a transaction? >
You can say usage of BufFile interface expects us to be in the transaction for so and so reason.... Do you think that we > should add comment in buffile/shared fileset API that it should be > called under a transaction? > I am fine with that as well. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com