Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XmUUk-0001lm-GV for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Nov 2014 21:21:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XmUUk-0003kv-3O for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Nov 2014 21:21:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XmUUj-0003kc-5F; Thu, 06 Nov 2014 21:21:29 +0000 Received: from mail-by2on0661.outbound.protection.outlook.com ([2a01:111:f400:fc0c::661] helo=na01-by2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XmUUf-0001K6-R4; Thu, 06 Nov 2014 21:21:27 +0000 Received: from decina.local (24.55.12.91) by BY1PR11MB0183.namprd11.prod.outlook.com (25.160.202.156) with Microsoft SMTP Server (TLS) id 15.1.11.14; Thu, 6 Nov 2014 21:21:18 +0000 Message-ID: <545BE646.7060808@BlueTreble.com> Date: Thu, 6 Nov 2014 15:21:10 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tom Lane , CC: , Subject: Re: [BUGS] BUG #11867: Strange behaviour with composite types after resetting database tablespace References: <20141104014957.23088.78673@wrigleys.postgresql.org> <2382.1415070484@sss.pgh.pa.us> <19835.1415119551@sss.pgh.pa.us> In-Reply-To: <19835.1415119551@sss.pgh.pa.us> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [24.55.12.91] X-ClientProxiedBy: BN3PR09CA0011.namprd09.prod.outlook.com (25.160.111.149) To BY1PR11MB0183.namprd11.prod.outlook.com (25.160.202.156) X-MS-Exchange-Transport-FromEntityHeader: Hosted X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR11MB0183; X-Exchange-Antispam-Report-Test: UriScan:; X-Forefront-PRVS: 0387D64A71 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(24454002)(199003)(377454003)(479174003)(97736003)(50986999)(33656002)(4396001)(54356999)(87266999)(65956001)(86362001)(66066001)(120916001)(47776003)(102836001)(59896002)(65806001)(101416001)(551934003)(21056001)(64706001)(23756003)(36756003)(50466002)(106356001)(15202345003)(92566001)(15975445006)(92726001)(105586002)(107046002)(46102003)(64126003)(76176999)(83506001)(40100003)(99396003)(20776003)(42186005)(19580395003)(95666004)(31966008)(65816999)(122386002)(87976001)(77096003)(80316001)(77156002)(62966003)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR11MB0183; H:decina.local; FPR:; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-OriginatorOrg: bluetreble.com X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 11/4/14, 10:45 AM, Tom Lane wrote: > So it's safe as things stand; but this seems a bit, um, rickety. Should > we insert a DropRelFileNodesAllBuffers call into ATExecSetTableSpace to > make it safer? It's kind of annoying to have to scan the buffer pool > twice, but I'm afraid that sometime in the future somebody will try to get > clever about optimizing away the end-of-transaction buffer pool scan, and > break this case. Or maybe I'm just worrying too much. We could possibly remember what relations have been moved to different tablespaces in a transaction and avoid the call in that case, but that seems rather silly. If there's any non-trivial actual data involved then presumably the buffer scan won't be noticed amidst all the IO, so this would only be an issue if you're playing games with mostly empty tables, and only then if you've got really large shared buffers. I can't actually come up with any real use case for that. So +1 for doing the safe thing... -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers