Thread: pgsql: Fix pg_identify_object_as_address() with event triggers
Fix pg_identify_object_as_address() with event triggers Attempting to use this function with event triggers failed, as, since its introduction in a676201, this code has never associated an object name with event triggers. This addresses the failure by adding the event trigger name to the set defining its object address. Note that regression tests are added within event_trigger and not object_address to avoid issues with concurrent connections in parallel schedules. Author: Joel Jacobson Discussion: https://postgr.es/m/3c905e77-a026-46ae-8835-c3f6cd1d24c8@www.fastmail.com Backpatch-through: 9.6 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f7aab36d61fd2fdbd949d5880247e8cae9ee4be0 Modified Files -------------- src/backend/catalog/objectaddress.c | 11 +++++------ src/test/regress/expected/event_trigger.out | 17 +++++++++++++++++ src/test/regress/sql/event_trigger.sql | 11 +++++++++++ 3 files changed, 33 insertions(+), 6 deletions(-)
Michael Paquier <michael@paquier.xyz> writes: > Fix pg_identify_object_as_address() with event triggers Looks like this has issues under RELCACHE_FORCE_RELEASE and/or CATCACHE_FORCE_RELEASE: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2021-04-28%2002%3A28%3A04 regards, tom lane
On Tue, Apr 27, 2021 at 10:44:08PM -0400, Tom Lane wrote: > Looks like this has issues under RELCACHE_FORCE_RELEASE > and/or CATCACHE_FORCE_RELEASE: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2021-04-28%2002%3A28%3A04 Yes, this is missing a pstrdup() for the event trigger name. I was just working on it. -- Michael