| From: | Bryan Green <dbryan(dot)green(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Allow complex data for GUC extra. |
| Date: | 2025-12-30 02:06:30 |
| Message-ID: | fe717d4f-080f-4508-89a0-af548e169e2d@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 12/29/2025 7:44 PM, Tom Lane wrote:
> Bryan Green <dbryan(dot)green(at)gmail(dot)com> writes:
>> One notable behavioral change: check hooks using GUC_EXTRA_IS_CONTEXT
>> now use palloc() instead of guc_malloc(). The old approach with
>> guc_malloc() allowed check hooks to return false on OOM, letting the
>> caller handle it at the appropriate error level. With palloc() an OOM
>> throws an immediate ERROR. This seemed like an acceptable tradeoff
>
> Why? It seems both inconsistent and unsafe.
>
> regards, tom lane
Fair enough to call me on that. I mainly thought that if we are having
problems allocating what is usually a few bytes then throwing an error
would have been acceptable. Based on your comment about unsafe and a
bit deeper thinking I can see where this is probably not a welcome
change in behavior. I suppose we could catch the error and convert it
to a false return.
--
Bryan Green
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2025-12-30 02:12:28 | Re: Implement waiting for wal lsn replay: reloaded |
| Previous Message | Henson Choi | 2025-12-30 01:59:16 | Re: [PATCH] Add missing XLogEnsureRecordSpace() call in LogLogicalMessage |