Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM
Date
Msg-id CALj2ACV697yS=kD_rt4ms4A+Dx1FyXiYcmGEZuPEYPJF0SC49A@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM  (vignesh C <vignesh21@gmail.com>)
Responses Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM
List pgsql-hackers
Thanks Vignesh and Rushabh for reviewing this.

I've added this patch to commitfest - https://commitfest.postgresql.org/28/.

Request community take this patch further if there are no further issues.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

On Sat, Jun 27, 2020 at 6:30 PM vignesh C <vignesh21@gmail.com> wrote:
>
> On Sat, Jun 27, 2020 at 9:23 AM Bharath Rupireddy
> <bharath.rupireddyforpostgres@gmail.com> wrote:
> >
> > Thanks Rushabh and Vignesh for the comments.
> >
> > >
> > > One comment:
> > > We could change below code:
> > > + */
> > > + if (!cstate->binary)
> > > + cstate->raw_buf = (char *) palloc(RAW_BUF_SIZE + 1);
> > > + else
> > > + cstate->raw_buf = NULL;
> > > to:
> > > cstate->raw_buf = (cstate->binary) ? NULL : (char *) palloc(RAW_BUF_SIZE + 1);
> > >
> >
> > Attached the patch with the above changes.
>
> Changes look fine to me.
>
> Regards,
> Vignesh
> EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Commitfest 2020-07
Next
From: Georgios
Date:
Subject: Re: Include access method in listTables output