From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
---|---|
To: | dgrowleyml(at)gmail(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposal: add new API to stringinfo |
Date: | 2025-01-05 01:51:29 |
Message-ID: | 20250105.105129.529148451853216562.ishii@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> If you have trouble convincing people we need this for some new
> reason, then maybe you could review the existing callers to see if
> some of the existing call sites make it any more convincing.
>
> A very quick review, I found:
>
> send_message_to_frontend() initStringInfo(&buf) 1024 is probably too big
> HandleParallelMessages() seems to know exactly how many bytes are
> needed. Can this use a read-only StringInfo?
> send_feedback() seems to know what size of the buffer it needs
I looked into send_feedback(). Maybe with the new API we could do
something like attached?
> buf_init() knows the exact size.
>
> I didn't review the patch in detail, but I think "initsize" would be a
> better parameter name than "size".
>
> David
>
>
Attachment | Content-Type | Size |
---|---|---|
worker.patch | text/x-patch | 646 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Gurjeet Singh | 2025-01-05 04:37:25 | Re: Proposal: add new API to stringinfo |
Previous Message | Filip Janus | 2025-01-04 23:43:05 | Re: Proposal: Adding compression of temporary files |