Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TlyZU-0007zp-Jh for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Dec 2012 09:07:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TlyZT-0001yu-LP for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Dec 2012 09:07:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TlyZT-0001yp-1U for pgsql-bugs@postgresql.org; Fri, 21 Dec 2012 09:07:11 +0000 Received: from mail.pcorp.us ([204.51.253.130]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TlyZM-0007Aq-BQ for pgsql-bugs@postgresql.org; Fri, 21 Dec 2012 09:07:10 +0000 Received: from O ([50.78.240.110]) by mail.pcorp.us ; Fri, 21 Dec 2012 04:07:00 -0500 From: "Paragon Corporation" To: "'Tom Lane'" Cc: , "'PostGIS Development Discussion'" References: <20121217140432.GB5099@awork2.anarazel.de> <320FE6BE45114A61884C5BEDB517D6E9@O> <20121217151117.GA4803@awork2.anarazel.de> <26090.1355761524@sss.pgh.pa.us> <74C64E2F526645CB983E4FF80E6B2E1B@O> <27985.1355767108@sss.pgh.pa.us> <2B9F3B80E42F4D1BB1F492D186DD62FA@O> <7346.1355778796@sss.pgh.pa.us> <24678.1356039709@sss.pgh.pa.us> In-Reply-To: <24678.1356039709@sss.pgh.pa.us> Subject: Re: BUG #7756: When upgrading postgis extension get row is too big: size 9272, maximum size 8160 Date: Fri, 21 Dec 2012 04:06:57 -0500 Message-ID: <998893993BC042A68E0C69A10C16BB96@O> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac3e+tMwr3JM5U5LS9GrSDHJgv/lHAAAO0rw X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609 X-Pg-Spam-Score: -1.9 (-) 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 >> "Paragon Corporation" writes: >>> I assumed that the : >>> pg_catalog.pg_extension_config_dump >>> Calls would overwrite each subsequent for a given object for a given >>> extension. So I have that in my upgrade script as well should we add >> more spatial_ref_sys records we want to avoid dumping. >>> It seems it just adds. >> It probably should overwrite --- this is something we simply didn't >> consider in the original coding. >> The other case I was considering is that ALTER EXTENSION DROP should >> probably remove any extconfig entry for a table that you disassociate >> from the extension. > I've committed patches to do the above in 9.1.8 and later. > However, since you'd probably like to update postgis before those versions are universally installed, what I suggest as a workaround is to have the extension update scripts do > UPDATE pg_extension SET extconfig = null, extcondition = null WHERE extname = 'postgis'; > before calling pg_extension_config_dump. Obviously, this wipes all your config-dump data, so if you've got more than one configuration table you'll need to be sure to do > pg_extension_config_dump for each of them in the update script. Thanks Tom will do. > BTW, I thought a bit about adding a TOAST table to pg_extension to eliminate the limit on the size of extcondition, but didn't actually do it. > We could not make that happen in 9.1 or 9.2, so you'd have to deal with the limit in any case. Furthermore, the coding technique you've got here seems like a bad idea anyway. Agree -- it was meant to be a stopgap and don't really see a big need for making pg_extension TOAST unless you plan to hold some sort of extension revision history in those arrays Which was what I thought might have been the original intention and reason for not overwritting. > The way I'd suggest doing it is to add a flag column to spatial_ref_sys so that the dump filter condition can be simply "WHERE NOT standard_entry" or some such. > That way the labeling can be directly associated with your source data and there's a lot less chance of failing to update the filter condition. That is our long term plan we just had some concerns about how to make the upgrade manageable and had a couple with one being the one you mentioned. All logged in this ticket http://trac.osgeo.org/postgis/ticket/1831 So the extension config solution I have only works for extensions and just a stop gap until we settle down on a more permanent solution. Thanks for all your help, Regina -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs