Re: wake up logical workers after ALTER SUBSCRIPTION - Mailing list pgsql-hackers

From Tom Lane
Subject Re: wake up logical workers after ALTER SUBSCRIPTION
Date
Msg-id 2268133.1674584035@sss.pgh.pa.us
Whole thread Raw
In response to Re: wake up logical workers after ALTER SUBSCRIPTION  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: wake up logical workers after ALTER SUBSCRIPTION
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> IMO ideally there should be a DSA_HANDLE_INVALID and DSHASH_HANDLE_INVALID
> for use with dsa_handle and dshash_table_handle, respectively.  But your
> patch does seem like an improvement.

Yeah, particularly given that dsa.h says

/*
 * The handle for a dsa_area is currently implemented as the dsm_handle
 * for the first DSM segment backing this dynamic storage area, but client
 * code shouldn't assume that is true.
 */
typedef dsm_handle dsa_handle;

but then provides no way for client code to not be aware that a
dsa_handle is a dsm_handle, if it needs to deal with "invalid" values.
Either that comment needs to be rewritten or we need to invent some
more macros.

I agree that the patch as given is an improvement on what was
committed, but I wonder whether we shouldn't work a little harder
on cleaning this up more widely.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpython vs _POSIX_C_SOURCE
Next
From: Alvaro Herrera
Date:
Subject: Re: Helper functions for wait_for_catchup() in Cluster.pm