Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQKpI-0006i2-O5 for pgsql-admin@arkaria.postgresql.org; Thu, 21 Jul 2016 20:44:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bQKpH-0006kG-3O for pgsql-admin@arkaria.postgresql.org; Thu, 21 Jul 2016 20:44:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQKpG-0006ju-ES for pgsql-admin@postgresql.org; Thu, 21 Jul 2016 20:44:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQKpC-0003Ad-Ap for pgsql-admin@postgresql.org; Thu, 21 Jul 2016 20:44:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6LKi3rj029964; Thu, 21 Jul 2016 16:44:03 -0400 From: Tom Lane To: Jorge Torralba cc: "pgsql-admin@postgresql.org" Subject: Re: Large Number Of Sequences in Database In-reply-to: References: Comments: In-reply-to Jorge Torralba message dated "Thu, 21 Jul 2016 13:32:26 -0700" Date: Thu, 21 Jul 2016 16:44:03 -0400 Message-ID: <29963.1469133843@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) 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 Jorge Torralba writes: > Doing some forensic work on a Postgres 9.5 database that is in testing with > only 19 relations and over 100,000 sequences. Once this database goes live, > it could see in excess of 1 Million sequences created due to the complexity > of the application. There are obvious risks such as pg_dump issues and slow > response when scanning catalog table for info. But, are there any serious > issues that can show up from this situation? I know theoretically, postgres > can have unlimited tables in a database. But, I am looking for some > realistic worse case scenarios in an environment like the one described. Reminds me of this talk: http://www.pgcon.org/2013/schedule/events/595.en.html 1M tables is a lot short of 1B, but still you'll start running into some of the same issues Alvaro described. Personally I'd look for another way to do it. (We've occasionally batted around the idea of merging all sequences into one catalog, which would help a lot; but the compatibility breakage that would ensue is a bit daunting.) regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin