From 2aeaf80e578ed48af88d54caf2ffcf7ca62617e8 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 3 Jul 2023 11:01:02 +0900 Subject: Refactor some code related to wait events "BufferPin" and "Extension" The following changes are done: - Addition of WaitEventBufferPin and WaitEventExtension, that hold a list of wait events related to each category. - Addition of two functions that encapsulate the list of wait events for each category. - Rename BUFFER_PIN to BUFFERPIN (only this wait event class used an underscore, requiring a specific rule in the automation script). These changes make a bit easier the automatic generation of all the code and documentation related to wait events, as all the wait event categories are now controlled by consistent structures and functions. Author: Bertrand Drouvot Discussion: https://postgr.es/m/c6f35117-4b20-4c78-1df5-d3056010dcf5@gmail.com Discussion: https://postgr.es/m/77a86b3a-c4a8-5f5d-69b9-d70bbf2e9b98@gmail.com --- contrib/dblink/dblink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/dblink/dblink.c') diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index 1ff65d1e521..41e1f6c91d6 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -203,7 +203,7 @@ dblink_get_conn(char *conname_or_str, dblink_connstr_check(connstr); /* OK to make connection */ - conn = libpqsrv_connect(connstr, PG_WAIT_EXTENSION); + conn = libpqsrv_connect(connstr, WAIT_EVENT_EXTENSION); if (PQstatus(conn) == CONNECTION_BAD) { @@ -293,7 +293,7 @@ dblink_connect(PG_FUNCTION_ARGS) dblink_connstr_check(connstr); /* OK to make connection */ - conn = libpqsrv_connect(connstr, PG_WAIT_EXTENSION); + conn = libpqsrv_connect(connstr, WAIT_EVENT_EXTENSION); if (PQstatus(conn) == CONNECTION_BAD) { -- cgit v1.2.3