Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyh74-0005Fg-PL for pgsql-general@arkaria.postgresql.org; Fri, 16 Aug 2019 18:38:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hyh73-0003wz-Dz for pgsql-general@arkaria.postgresql.org; Fri, 16 Aug 2019 18:38:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyh72-0003tZ-8R for pgsql-general@lists.postgresql.org; Fri, 16 Aug 2019 18:38:09 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hyh6y-0004li-Nd for pgsql-general@lists.postgresql.org; Fri, 16 Aug 2019 18:38:07 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B40AE509; Fri, 16 Aug 2019 14:38:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 16 Aug 2019 14:38:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=Z nB/u4RoOOYVCopS898glaRZEt6S90QGWLnMdRViCvg=; b=uLfgNBsIeeVPp/iG0 +5RPsHCsTDOXafzdcHi4q+EVSx5ytoX6QUmMDbSv4WqqBRbjveUpjvvKdzaNgqsv hwjKQRyusVdoltx+VbA8VnTtX2aDF6r7KY/JHD/56+ymzcXEYMoibV78CoCstsIN wjhrIwQzr3A0eCg6pwFLa4mDkeLGUAVCfBdNMuJpDoNGKDRueFeWTdQudtlZAky/ lamplhghU541/itvjofZ3ufIXujmhnsHy5RqSQSw1rjxAzzXwgZxfknYR2SZtjWk XQDQzJrgYrvERXRW16icm1t8ReN7S1hVvHyUbwb7GL6dgvTjwq3I6EyEIS5/UcHk MZSwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=ZnB/u4RoOOYVCopS898glaRZEt6S90QGWLnMdRViC vg=; b=C/BWqB9xPrP+uZjT56szXZFtnsBUQfhOaoyNCgBHY4Pga56J6v7gHKxeK JWcRxeh4swRP21JIVfo7jpmx9HRTHiqXRFAZfC9e+xH5YA8rYxlgSAdPNUC/Bn+i TkqaRRJgQylvLjX6k5S22v27O/Qhn3G0XQoi0yzK9XWcS4y5xi3SqFdu2KFqaYwE lttWdJ2gKBawRiTFoU1t7dqI7QWDAfgjzPT3ssVww2AfNqMAnYY7wNpcPquaLxew 8Gdyd/knqfY9U4i/Ge5mB7XdSI6jqP1174jK2ypeBA99qLq3brLG1LQw3CpApEqQ ozUzN9WJzmfoIWRbfNEO8qhs1PxIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeffedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucfkphepjeegrdelgedrjeefrddvvd dvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhl rghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from ranger.suse (unknown [74.94.73.222]) by mail.messagingengine.com (Postfix) with ESMTPA id 68EAB380085; Fri, 16 Aug 2019 14:38:00 -0400 (EDT) Subject: Re: Missing Trigger after pgdump install To: susan.hurst@brookhurstdata.com, Discuss List Postgres References: <53f9ff4448f5210802b5a04c8fa83186@mail.brookhurstdata.net> From: Adrian Klaver Message-ID: <40cc8a45-5276-b64f-3ad8-a39865bb2a21@aklaver.com> Date: Fri, 16 Aug 2019 11:37:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <53f9ff4448f5210802b5a04c8fa83186@mail.brookhurstdata.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 8/16/19 11:27 AM, Susan Hurst wrote: > What scenarios can cause a single trigger to be omitted when populating > an empty database from a pgdump file? > > We have nightly backups of our production database that we load into a > fresh, empty database in our sandbox using the pgdump file. > > psql.exe -h localhost -U mi601db -p 5432 -o > C:db_create_output.txt -L C:\\db_create_log.txt -d > skyfall < C:\mi601db.pg What is the dump command? What happens if you add -b to above? Which log file are you referring to below, the one generated above or the Postgres server log? > > All objects and data appear in the new database as expected, except for > a single trigger named subscribers_iur_trg.  The trigger exists in > production and in the pgdump file.  I can add it manually with no errors > but it's always missing after our automated process.  Nothing useful > appears in the log file. The dependent function, > devops.subscribers_update() is present and accounted for as is the view, > devops.subscribers. > > CREATE TRIGGER subscribers_iur_trg >   INSTEAD OF UPDATE >   ON devops.subscribers >   FOR EACH ROW >   EXECUTE PROCEDURE devops.subscribers_update(); > > We've checked everything we can think of but we're still missing the > trigger every day. > > Thanks for your help! > > Sue -- Adrian Klaver adrian.klaver@aklaver.com