From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM |
Date: | 2020-06-27 03:53:24 |
Message-ID: | CALj2ACWRfR-gRpno5eE1oo8twC4sfode0odsh2_DStNtM-YvHw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Remove-Extra-palloc-Of-raw_buf-For-Binary-Format-.patch | application/octet-stream | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-06-27 05:14:28 | Re: xid wraparound danger due to INDEX_CLEANUP false |
Previous Message | David G. Johnston | 2020-06-27 02:33:36 | Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit |