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 1i6HZU-00083H-L0 for pgsql-general@arkaria.postgresql.org; Fri, 06 Sep 2019 16:58:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i6HZT-0007iQ-Fn for pgsql-general@arkaria.postgresql.org; Fri, 06 Sep 2019 16:58:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i6HZS-0007hp-M0 for pgsql-general@lists.postgresql.org; Fri, 06 Sep 2019 16:58:51 +0000 Received: from resqmta-ch2-05v.sys.comcast.net ([2001:558:fe21:29:69:252:207:37]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i6HZP-0006Ps-Qp for pgsql-general@postgresql.org; Fri, 06 Sep 2019 16:58:49 +0000 Received: from resomta-ch2-08v.sys.comcast.net ([69.252.207.104]) by resqmta-ch2-05v.sys.comcast.net with ESMTP id 6Fd9iVArqWwBZ6HZOiJwXr; Fri, 06 Sep 2019 16:58:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1567789126; bh=d0ZBr26Eo3E3TODMiMLpsEgTxf11crW+gJBcfZ9vTnI=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=NW43rgL3EjbIkSIbkxK7Tf4YItbUkXZ0H9G2orRFITSsCEeYhv9gb1X1Y496pyM9W GJwt60JNmZqtOTbUHJmY4TO8z5v7RrBrdsgRZBwnKoC8hm1aj7cIaHEMeWOuT3MDOr ur9/EZWPj/gfmJlsEteyAfu98Ln0FLbU7oV/TUeM39c8xPnMKxk+9jXEhKbqHZqviw Zx+HGYw+dFZyD5e5565aq68QJEzBJVJaWFPjpXIdpkeHvNeJYkGIiq0fKqeFDyN77o HWw0vqrKcT9JfQgBM6B/R56OMS3VopqhCucaVWZIuNQJTGcupERk01pRSCzdAeyPJu idcaOdqpFrmGw== Received: from jsievers.comcast.net ([12.30.159.20]) by resomta-ch2-08v.sys.comcast.net with ESMTPA id 6HZDi8xSDLQkL6HZEi9L26; Fri, 06 Sep 2019 16:58:44 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduvddrudejledgleegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpeflvghrrhihucfuihgvvhgvrhhsuceoghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeduvddrfedtrdduheelrddvtdenucfrrghrrghmpehhvghlohepjhhsihgvvhgvrhhsrdgtohhmtggrshhtrdhnvghtpdhinhgvthepuddvrdeftddrudehledrvddtpdhmrghilhhfrhhomhepghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepkhgsrhgrnhhnvghnsegvfhhjihdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Xfinity-VMeta: sc=-100;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id 9B34926005A; Fri, 6 Sep 2019 11:58:35 -0500 (CDT) From: Jerry Sievers To: Kevin Brannen Cc: Jerry Sievers , "pgsql-general\@postgresql.org" Subject: Re: pg_restore issues with intarray References: <587d9b02-e4c4-c08e-4b70-169d029bd3e7@aklaver.com> <804d3055-b371-d914-7a77-1b9d8cf703cf@aklaver.com> <87ftla1cqg.fsf@jsievers.enova.com> Date: Fri, 06 Sep 2019 11:58:35 -0500 In-Reply-To: (Kevin Brannen's message of "Fri, 6 Sep 2019 15:32:17 +0000") Message-ID: <87v9u5mkec.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Kevin Brannen writes: >>From: Jerry Sievers >> >>>Kevin Brannen writes: >>> >>> It feels like the restore is adding the intarray extension, which does >>> a CREATE OPERATOR FAMILY on its own, then later the restore does >>> CREATE OPERATOR FAMILY on again causing the problem. Yet this doesn't >>> happen on most of our databases, just a few. It's maddening to me. >>> >> >>I've seen this sort of problem before. >> >>It was due to some legacy DBs where I work having a few missing extension membership registrations. >> >>pg_dump wants to include any such things in the output which may run afoul of same having been already created by the extension load. > > Ugh! That would explain why it's only on some installs and only on the > "older" ones. Thanks for the info! > > Did you ever find any work around? Or is it just a matter of recognizing > what's going on, ignore those "warnings", and moving to a later version to > get past this so it doesn't happen again? Try running \dx+ for intarray on one of your deviant systems. You may find the item pg_dump is trying to be explicit about *missing* from the extension member list. In such a case, see the ALTER EXTENSION ADD... which can be run manually to register whatever is missing. You will do this on the system that is *origin* for the pg_dump. This is what we've done. YMMV postgres# \dx+ intarray Objects in extension "intarray" Object description ------------------------------------------------------------------------------------------------------ function boolop(integer[],query_int) function bqarr_in(cstring) function bqarr_out(query_int) function ginint4_consistent(internal,smallint,integer[],integer,internal,internal,internal,internal) function ginint4_queryextract(integer[],internal,smallint,internal,internal,internal,internal) function g_intbig_compress(internal) function g_intbig_consistent(internal,integer[],smallint,oid,internal) function g_intbig_decompress(internal) function g_intbig_penalty(internal,internal,internal) function g_intbig_picksplit(internal,internal) function g_intbig_same(intbig_gkey,intbig_gkey,internal) function g_intbig_union(internal,internal) function g_int_compress(internal) function g_int_consistent(internal,integer[],smallint,oid,internal) function g_int_decompress(internal) function g_int_penalty(internal,internal,internal) function g_int_picksplit(internal,internal) function g_int_same(integer[],integer[],internal) function g_int_union(internal,internal) function icount(integer[]) function idx(integer[],integer) function intarray_del_elem(integer[],integer) function intarray_push_array(integer[],integer[]) function intarray_push_elem(integer[],integer) function _intbig_in(cstring) function _intbig_out(intbig_gkey) function _int_contained(integer[],integer[]) function _int_contained_joinsel(internal,oid,internal,smallint,internal) function _int_contained_sel(internal,oid,internal,integer) function _int_contains(integer[],integer[]) function _int_contains_joinsel(internal,oid,internal,smallint,internal) function _int_contains_sel(internal,oid,internal,integer) function _int_different(integer[],integer[]) function _int_inter(integer[],integer[]) function _int_matchsel(internal,oid,internal,integer) function _int_overlap(integer[],integer[]) function _int_overlap_joinsel(internal,oid,internal,smallint,internal) function _int_overlap_sel(internal,oid,internal,integer) function _int_same(integer[],integer[]) function intset(integer) function intset_subtract(integer[],integer[]) function intset_union_elem(integer[],integer) function _int_union(integer[],integer[]) function querytree(query_int) function rboolop(query_int,integer[]) function sort_asc(integer[]) function sort_desc(integer[]) function sort(integer[]) function sort(integer[],text) function subarray(integer[],integer) function subarray(integer[],integer,integer) function uniq(integer[]) operator class gin__int_ops for access method gin operator class gist__intbig_ops for access method gist operator class gist__int_ops for access method gist operator family gin__int_ops for access method gin operator family gist__intbig_ops for access method gist operator family gist__int_ops for access method gist operator ~(integer[],integer[]) operator <@(integer[],integer[]) operator |(integer[],integer) operator |(integer[],integer[]) operator -(integer[],integer) operator -(integer[],integer[]) operator @>(integer[],integer[]) operator @(integer[],integer[]) operator &(integer[],integer[]) operator &&(integer[],integer[]) operator #(integer[],integer) operator +(integer[],integer) operator +(integer[],integer[]) operator @@(integer[],query_int) operator #(NONE,integer[]) operator ~~(query_int,integer[]) type intbig_gkey type query_int (76 rows) meta_a:postgres# \h alter extension Command: ALTER EXTENSION Description: change the definition of an extension Syntax: ALTER EXTENSION name UPDATE [ TO new_version ] ALTER EXTENSION name SET SCHEMA new_schema ALTER EXTENSION name ADD member_object ALTER EXTENSION name DROP member_object where member_object is: ACCESS METHOD object_name | AGGREGATE aggregate_name ( aggregate_signature ) | CAST (source_type AS target_type) | COLLATION object_name | CONVERSION object_name | DOMAIN object_name | EVENT TRIGGER object_name | FOREIGN DATA WRAPPER object_name | FOREIGN TABLE object_name | FUNCTION function_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] | MATERIALIZED VIEW object_name | OPERATOR operator_name (left_type, right_type) | OPERATOR CLASS object_name USING index_method | OPERATOR FAMILY object_name USING index_method | [ PROCEDURAL ] LANGUAGE object_name | PROCEDURE procedure_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] | ROUTINE routine_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] | SCHEMA object_name | SEQUENCE object_name | SERVER object_name | TABLE object_name | TEXT SEARCH CONFIGURATION object_name | TEXT SEARCH DICTIONARY object_name | TEXT SEARCH PARSER object_name | TEXT SEARCH TEMPLATE object_name | TRANSFORM FOR type_name LANGUAGE lang_name | TYPE object_name | VIEW object_name and aggregate_signature is: * | [ argmode ] [ argname ] argtype [ , ... ] | [ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] argtype [ , ... ] URL: https://www.postgresql.org/docs/12/sql-alterextension.html > > Kevin > This e-mail transmission, and any documents, files or previous e-mail > messages attached to it, may contain confidential information. If you > are not the intended recipient, or a person responsible for delivering > it to the intended recipient, you are hereby notified that any > disclosure, distribution, review, copy or use of any of the > information contained in or attached to this message is STRICTLY > PROHIBITED. If you have received this transmission in error, please > immediately notify us by reply e-mail, and destroy the original > transmission and its attachments without reading them or saving them > to disk. Thank you. -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net