Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TdgEk-00021z-0B for pgsql-admin@arkaria.postgresql.org; Wed, 28 Nov 2012 11:55:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TdgEi-0006qM-Q2 for pgsql-admin@arkaria.postgresql.org; Wed, 28 Nov 2012 11:55:28 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TdaKa-0000vw-Cx for pgsql-admin@postgresql.org; Wed, 28 Nov 2012 05:37:08 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TdaKZ-0004eb-8F for pgsql-admin@postgresql.org; Wed, 28 Nov 2012 05:37:07 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TdaKX-0006cx-QV for pgsql-admin@postgresql.org; Tue, 27 Nov 2012 21:37:05 -0800 Date: Tue, 27 Nov 2012 21:37:05 -0800 (PST) From: "suhas.basavaraj12" To: pgsql-admin@postgresql.org Message-ID: <1354081025812-5733850.post@n5.nabble.com> Subject: PG_REORG ISSUE MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi, Found a peculiar issue with reorg_trigger on one of the important table in the db. SELECT>ERROR: must be superuser to use reorg_trigger function. Due to this , table was not accessible by application and all the stored procedures which run on that table failed. I did \d affected_table , but that trigger was not there on that table .But when i searched in schema i found below trigger CREATE FUNCTION conflicted_triggers(oid) RETURNS SETOF name LANGUAGE sql STABLE STRICT AS $_$ SELECT tgname FROM pg_trigger WHERE tgrelid = $1 AND tgname >= 'z_reorg_trigger' $_$; CREATE FUNCTION get_create_trigger(relid oid, pkid oid) RETURNS text LANGUAGE sql STABLE STRICT AS $_$ SELECT 'CREATE TRIGGER z_reorg_trigger' || ' BEFORE INSERT OR DELETE OR UPDATE ON ' || reorg.oid2text($1) || ' FOR EACH ROW EXECUTE PROCEDURE reorg.reorg_trigger(' || '''INSERT INTO reorg.log_' || $1 || '(pk, row) VALUES(' || ' CASE WHEN $1 IS NULL THEN NULL ELSE (ROW($1.' || reorg.get_index_columns($2, ', $1.') || ')::reorg.pk_' || $1 || ') END, $2)'')'; $_$; CREATE TRIGGER z_reorg_trigger BEFORE INSERT OR DELETE OR UPDATE ON AFFECTED_TABLE FOR EACH ROW EXECUTE PROCEDURE reorg.reorg_trigger('INSERT INTO reorg.log_16793623(pk, row) VALUES( CASE WHEN $1 IS NULL THEN NULL ELSE (ROW($1.sequence_id)::reorg.pk_16793623) END, $2)'); CREATE FUNCTION reorg_trigger() RETURNS trigger LANGUAGE c STRICT SECURITY DEFINER AS '$libdir/pg_reorg', 'reorg_trigger'; when i checked this belonged to pg_reorg, but i do not understand why this error was coming Rgrds Suhas -- View this message in context: http://postgresql.1045698.n5.nabble.com/PG-REORG-ISSUE-tp5733850.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin