Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKRoW-0007hD-BG for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Jun 2017 16:03:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dKRoV-00056d-MS for pgsql-bugs@arkaria.postgresql.org; Mon, 12 Jun 2017 16:03:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dKRnn-0002dN-Ai for pgsql-bugs@postgresql.org; Mon, 12 Jun 2017 16:02:51 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dKRnk-0004Qo-LR for pgsql-bugs@postgresql.org; Mon, 12 Jun 2017 16:02:49 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id F270F20B10; Mon, 12 Jun 2017 12:02:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 12 Jun 2017 12:02:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=5oVNGQsNYOrlrMPiPAbCWzQCcXRqmEXg8NH0I3LHs/A=; b=M/I3ofYh reMavfLt1SPVHGgnDjpGbPxb1znXJGCDL7BALolT28A1fUI53nG0xzFfrYBTBlYd lCDTFHalVi6Y4VRUwgTER7qCygNGbIkjk3iUXyqDfEZzzE0acly8uSnLTfSZyIni AtHtb/Gz/F9ixGM91AkgTIsNfnriXBM4onOXrKjyer5wvFBNfHCBDNGTZPII/rGE qVR4kFX0ywZsf54cr0wh/7LEZoCRB76WdMcKVCmc9ysKvGfpJN7+X4jh+jyBS/6t NVrttgW2KfbRD0K+4wtAjgLdH/3wFob5RJsI+JwrPhieSJID7qqIHkp8jPTr67b+ 1eCOTRvshJ4x4Q== X-ME-Sender: X-Sasl-enc: 82fEuzgfOifi7VPEwqRQTPj079ZeKVPFGS/ER83ftnkf 1497283367 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id AE393248B9; Mon, 12 Jun 2017 12:02:47 -0400 (EDT) Subject: Re: BUG #14701: pg_dump fails to dump pg_catalog schema To: Tom Lane , neil@postgrescompare.com References: <20170610203905.26508.74104@wrigleys.postgresql.org> <10396.1497226792@sss.pgh.pa.us> Cc: pgsql-bugs@postgresql.org From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 12 Jun 2017 12:02:47 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <10396.1497226792@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 6/11/17 20:19, Tom Lane wrote: > neil@postgrescompare.com writes: >> Just installed the beta of v10 on my Mac and attempted to dump the contents >> of pg_catalog as follows. > >> ./bin/pg_dump -U postgres -n pg_catalog >> pg_dump: unrecognized collation provider: d > > The reason for that is that the "default" collation has collprovider = > 'd', which pg_dump doesn't know what to do with, and I'm not sure it > could do anything sensible with given that CREATE COLLATION doesn't > accept anything corresponding to that. OTOH, I'm not real sure what > is the point of the 'd' value, because I can find no code in the backend > that deals with COLLPROVIDER_DEFAULT; it seems at best rather accidental > that the entry works at all. We could get rid of the 'd' and have > some hack to make initdb insert the appropriate 'i' or 'c' value > based on USE_ICU, perhaps. Conceptually, the locale code works like this: if provider == d strcoll() else if provider == c strcoll_l() else if provider == i ucol_strcoll() [else apparently dubious here ...] But actually the code checks for DEFAULT_COLLATION_OID instead of provider == 'd', so having another collation with provider 'd' isn't going to do anything useful. Maybe it would actually be vaguely useful to change that around, now that I think about it. > Alternatively, I think that CREATE COLLATION > ought to grow the ability to accept "provider = default" and pg_dump > should use that. We could probably do that at least in pg_dump. What are the expectations for pg_catalog schema dumps? Are they supposed to be restorable? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs