Skip to content

Commit 7cde649

Browse files
committed
Fix logical replication to fire BEFORE ROW DELETE triggers.
Before, that would fail to happen unless a BEFORE ROW UPDATE trigger was also present. Noted by me while reviewing a patch from Masahiko Sawada, who also wrote this patch. Reviewed by Petr Jelinek. Discussion: http://postgr.es/m/CA+TgmobAZvCxduG8y_mQKBK7nz-vhbdLvjM354KEFozpuzMN5A@mail.gmail.com
1 parent 604723d commit 7cde649

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/execReplication.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ ExecSimpleRelationDelete(EState *estate, EPQState *epqstate,
511511

512512
/* BEFORE ROW DELETE Triggers */
513513
if (resultRelInfo->ri_TrigDesc &&
514-
resultRelInfo->ri_TrigDesc->trig_update_before_row)
514+
resultRelInfo->ri_TrigDesc->trig_delete_before_row)
515515
{
516516
skip_tuple = !ExecBRDeleteTriggers(estate, epqstate, resultRelInfo,
517517
&searchslot->tts_tuple->t_self,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy