pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Melih Mutlu <m.melihmutlu@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
Date: Tue, 24 Jan 2023 13:13:55 -0500
Message-ID: <2268133.1674584035@sss.pgh.pa.us> (raw)
In-Reply-To: <20230124171329.GA677220@nathanxps13>
References: <CAA4eK1JFgvhxV448uNTkKpQpGe+X8WRWtyf45h4vASEpNz3Gkw@mail.gmail.com>
	<20230105171933.GB299579@nathanxps13>
	<CAA4eK1L-N9aUpoCXhoBCiEJAGw3cmKxaxn0Fo43ja+qzAGeyhQ@mail.gmail.com>
	<20230106054017.GA786807@nathanxps13>
	<3355444.1673044286@sss.pgh.pa.us>
	<20230107004525.GB789289@nathanxps13>
	<CAA4eK1+2VbK8BCrG7xFKJQKhYhYwWwkddAN2gL2coUQnTKLJ3g@mail.gmail.com>
	<20230110174345.GA1292607@nathanxps13>
	<1353772.1674414774@sss.pgh.pa.us>
	<OS0PR01MB5716860B1454C34E5B179B6694C99@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<20230124171329.GA677220@nathanxps13>

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





view thread (77+ messages)  latest in thread

Message-ID: <2268133.1674584035@sss.pgh.pa.us>
Permalink:  ../2268133.1674584035@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2268133.1674584035@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, houzj.fnst@fujitsu.com, amit.kapila16@gmail.com, m.melihmutlu@gmail.com, thomas.munro@gmail.com, kuroda.hayato@fujitsu.com
  Subject: Re: wake up logical workers after ALTER SUBSCRIPTION
  In-Reply-To: <2268133.1674584035@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox