Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7d9z-0002Uc-Oo for pgsql-general@arkaria.postgresql.org; Wed, 12 Jan 2022 12:55:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n7d9y-0000Qw-Ke for pgsql-general@arkaria.postgresql.org; Wed, 12 Jan 2022 12:55:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7d9y-0000QN-AD for pgsql-general@lists.postgresql.org; Wed, 12 Jan 2022 12:55:26 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n7d9w-0001Fm-5v for pgsql-general@lists.postgresql.org; Wed, 12 Jan 2022 12:55:25 +0000 Received: by mail-pj1-x1036.google.com with SMTP id b1-20020a17090a990100b001b14bd47532so4633197pjp.0 for ; Wed, 12 Jan 2022 04:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6NdY0+rW1lvecW11EJCkOeuxETwLg7R8+lhXnaPmZYI=; b=kyhXleznXRB/1o35sHIctbsh6gxxcZxyV3+OhzvxbuCBzMTbtFot6imq+owEcnJTYe RysWF2XAYmUzO/3oMq+752INNMuMqjUENfiHQoPhDkOtD6XIHkkhd/0VoOGrx12DqEf8 zJQFgJyJth25Ooz8zBaxYOtmlpFoRXFecSp2q8QIJ2uoWku9u5VXTXHh643Dh901aKJa xvX4R5DZPIjzl2IK39knSYaS/1SyhsoirrJyS38oxg31cEaUNOsClY9be8UV4ksunv6M /hN9GMoCAuqlBMRStSHeYpUsyM2HXD+ynwm4TNTWiWU4X8+LYShUeZCgZ+c9Yp3ApVJo sHtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6NdY0+rW1lvecW11EJCkOeuxETwLg7R8+lhXnaPmZYI=; b=hOSNayE65GOwI2t/3D3uSOhZcSahcg1kVKEfM3ws/5omIPhjlWGxSkcMnd8xeL1nEy s8qDEahuCU7c3IF9lF1u1uXJacN76OsetKFihWMiCdQEGDbwWysZX9l44No0/vYWnRIx fyGo66FuZWA9MA+pDw32CxKWbi7WbTmJQyQPpfzrBd56k73nDSG0oSVYAb5A9Q1pGHDX pDMLtPXNU+0vjWrAg7khYXdWxQlwsHeoKmLVTYF0UPXpqeSC28IIdefEgKpPvGbQeJrv HFJP8fnb9JY60NWCpwilX2+raPYSjsY0C1GSAVI/7X3crb7Cc6X/Kg7HCdig6zFqDpgR sFjg== X-Gm-Message-State: AOAM533lxrB5QNq7OPOCmdhK8HRejIaBPBQiYYjOZprhvhSp0mRBN6XU AogSoH6atU0ezUDLeh1BuWyQ76pY8RqGNA== X-Google-Smtp-Source: ABdhPJy0l9CIA4TqV0+n/f/gZhzeuSYYg0iqEtXtrD2LJz//3exI1UZVkfl5tYblVdRfzoGfob/gGw== X-Received: by 2002:a17:90b:4c4b:: with SMTP id np11mr8620973pjb.32.1641992122325; Wed, 12 Jan 2022 04:55:22 -0800 (PST) Received: from jrouhaud (1-171-174-202.dynamic-ip.hinet.net. [1.171.174.202]) by smtp.gmail.com with ESMTPSA id y14sm2645081pgo.87.2022.01.12.04.55.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 04:55:21 -0800 (PST) Date: Wed, 12 Jan 2022 20:55:17 +0800 From: Julien Rouhaud To: "Zwettler Markus (OIZ)" Cc: "pgsql-general@lists.postgresql.org" Subject: Re: postgres event trigger workaround Message-ID: <20220112125517.idglbczyiargb56f@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Wed, Jan 12, 2022 at 11:57:45AM +0000, Zwettler Markus (OIZ) wrote: > > PG event triggers are not firing on CREATE ROLE, CREATE DATABASE, CREATE > TABLESPACE by definition (would be nice if they do). > > Is there any workaround to react with ddl_command_start behavior on such an > event? That's not possible. The limitation exists because those objects are shared objects and therefore could be created from any database in the cluster. What is your use case? Maybe you could rely on logging all DDL instead for instance.