From: | John Naylor <johncnaylorls(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION } |
Date: | 2023-12-05 16:22:14 |
Message-ID: | CANWCAZaCJEj2p9B17v73GR40PFiAzaTVXcvgAmTuf8pA7MLZXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 5, 2023 at 7:55 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>
> On Tue, 2023-11-21 at 09:24 -0500, Robert Haas wrote:
> > As to the second, could we somehow come
> > up with an API for guc.c where you can ask for an opaque handle that
> > will later allow you to do a fast-SET of a GUC?
>
> Yes, attached. That provides a significant speedup: my test goes from
> around ~7300ms to ~6800ms.
>
> This doesn't seem very controversial or complex, so I'll probably
> commit this soon unless someone else has a comment.
+ * set_config_option_ext: sets option with the given handle to the given
+ * value.
Copy-paste-o of the other function name.
+config_handle *
+get_config_handle(const char *name)
+{
+ struct config_generic *record;
+
+ record = find_option(name, false, false, 0);
+ if (record == NULL)
+ return 0;
Part of this code this was copied from a function that returned int,
but this one returns a pointer.
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2023-12-05 16:53:37 | Re: logical decoding and replication of sequences, take 2 |
Previous Message | Robert Haas | 2023-12-05 16:16:29 | Re: introduce dynamic shared memory registry |