Skip to content

Latest commit

 

History

History
91 lines (63 loc) · 3.86 KB

20230926_01.md

File metadata and controls

91 lines (63 loc) · 3.86 KB

PostgreSQL 17 preview - Add GUC: event_triggers . for temporarily disabling event triggers

作者

digoal

日期

2023-09-26

标签

PostgreSQL , PolarDB , event_triggers , guc , 临时关闭事件触发器


背景

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=7750fefdb2b81e0ee09c523d0a21cbd37edaf4b2

Add GUC for temporarily disabling event triggers  
  
author	Daniel Gustafsson <dgustafsson@postgresql.org>	  
Mon, 25 Sep 2023 10:41:49 +0000 (12:41 +0200)  
committer	Daniel Gustafsson <dgustafsson@postgresql.org>	  
Mon, 25 Sep 2023 10:41:49 +0000 (12:41 +0200)  
commit	7750fefdb2b81e0ee09c523d0a21cbd37edaf4b2  
tree	6e1973a44ffbf5a5ebd91906078ec8bc89d2dc98	tree  
parent	f19669fed3efe872425c80d4b1f45bf59267b7ea	commit | diff  
Add GUC for temporarily disabling event triggers  
  
In order to troubleshoot misbehaving or buggy event triggers, the  
documented advice is to enter single-user mode.  In an attempt to  
reduce the number of situations where single-user mode is required  
(or even recommended) for non-extraordinary maintenance, this GUC  
allows to temporarily suspend event triggers.  
  
This was originally extracted from a larger patchset which aimed  
at supporting event triggers on login events.  
  
Reviewed-by: Ted Yu <yuzhihong@gmail.com>  
Reviewed-by: Mikhail Gribkov <youzhick@gmail.com>  
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>  
Reviewed-by: Michael Paquier <michael@paquier.xyz  
Reviewed-by: Robert Haas <robertmhaas@gmail.com>  
Discussion: https://postgr.es/m/9140106E-F9BF-4D85-8FC8-F2D3C094A6D9@yesql.se  
Discussion: https://postgr.es/m/0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru  
+     <varlistentry id="guc-event-triggers" xreflabel="event_triggers">  
+      <term><varname>event_triggers</varname> (<type>boolean</type>)  
+      <indexterm>  
+       <primary><varname>event_triggers</varname></primary>  
+       <secondary>configuration parameter</secondary>  
+     </indexterm>  
+     </term>  
+     <listitem>  
+      <para>  
+       Allow temporarily disabling execution of event triggers in order to  
+       troubleshoot and repair faulty event triggers. All event triggers will  
+       be disabled by setting it to <literal>false</literal>. Setting the value  
+       to <literal>true</literal> allows all event triggers to fire, this  
+       is the default value. Only superusers and users with the appropriate  
+       <literal>SET</literal> privilege can change this setting.  
+      </para>  
+     </listitem>  
+     </varlistentry>  

digoal's wechat