Re: [PATCH] Performance Improvement For Copy From Binary Files - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: [PATCH] Performance Improvement For Copy From Binary Files
Date
Msg-id CALj2ACULf3JEx+eD9xncJ0H-6w6Ep7-ypywotp2AaHrYVxrsxw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Performance Improvement For Copy From Binary Files  (vignesh C <vignesh21@gmail.com>)
Responses Re: [PATCH] Performance Improvement For Copy From Binary Files  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
>
> I had one small comment:
> +{
> +       int             copied_bytes = 0;
> +
> +#define BUF_BYTES      (cstate->raw_buf_len - cstate->raw_buf_index)
> +#define DRAIN_COPY_RAW_BUF(cstate, dest, nbytes)\
> +       do {\
> +               memcpy((dest), (cstate)->raw_buf +
> (cstate)->raw_buf_index, (nbytes));\
> +               (cstate)->raw_buf_index += (nbytes);\
> +       } while(0)
>
> BUF_BYTES could be used in CopyLoadRawBuf function also.
>

Thanks Vignesh for the find out. I changed and attached the v5 patch.
The regression tests(make check and make check-world) ran
successfully.

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

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: proposal: possibility to read dumped table's name from file
Next
From: Tomas Vondra
Date:
Subject: Re: WIP: BRIN multi-range indexes