Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDbtK-0004Tf-64 for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jun 2016 18:19:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDbtJ-0003Ng-IW for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jun 2016 18:19:45 +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 1bDbtJ-0003Mg-52 for pgsql-bugs@postgresql.org; Thu, 16 Jun 2016 18:19:45 +0000 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bDbtC-0006O9-79 for pgsql-bugs@postgresql.org; Thu, 16 Jun 2016 18:19:44 +0000 Received: by mail-qk0-x234.google.com with SMTP id s186so62009527qkc.1 for ; Thu, 16 Jun 2016 11:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=Y6B0AECwtWf9aDYJ1hnoZEr191an8eTMLMbS9eDczNM=; b=QcFODBeY0esprHBD0IUaWCJfMFIi5zmWhylUUS2SDPC/RjOc+6XM2kL/EXXR9iU8ag MgOJDV7b0aVMkRfQQvsqkPVIqZu/Me2O4sD4iNV3rAPOBwFSAtiOQevHg9/o4KjRvd23 4NgbZ3omxcP6hPPNxs3x/jq1k2DTdtbTmYQPeHU53+LPhYDpVdEhyzP/4Ifu7Vf8qX0j noZzyWMtj8e+fdui7oKQCP26LWCuOeCvMrdwjxtfle1y4KxSIilEhG8gvCZcNDh2ncgC szWqkrgVsUSdu80WOR52DouX0uZH+UYlO6Yzv+F3CGXSZwcdSQMAyKswKWV//1dJEzaF vO/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=Y6B0AECwtWf9aDYJ1hnoZEr191an8eTMLMbS9eDczNM=; b=jFOMnA+modbHMnc6jKre2JRJc5cnTxyz/HjXb7sYCJrKj7PguQtUJ3hB+dRyQsCXfu ETTTB0ZRo4hB69/T59cwWiEJOfaFpE+HZ3nAxtxeDScCgWkM9OVyPGTg2svRAV0wciRI 8grGQDgOz7k6KHWE5k8is5iLRM/HIhVp5rpXhrVmac57aojRROmngh7tq0l3/0rUoG/x 8/doIySwMJMXsbMadAtCIOaMo3GSOWhWmtEk+EBTJd6VVVSoMzhLaDoDE16FEnPdKdDL W+rTSYbJWPTHPeikU5dOuoQA42BIXM78IwiBhK6KZ9U5Mwye3IxIDuw5eaCCESWniuHv l28g== X-Gm-Message-State: ALyK8tKIW/wmAIplIY/TnB5GSlsuhaG7BCDiQMbapjcnmKpC8+mYI+PkfvL1wE1C6gv5wKbeNJ/6IPvZRgGC0Fv1Wgxi0Q6CCTXaduooPRsV8xCVgayE5eoOI77oBxM2K5Fkz3cztAIuGNgEtnNjYkoldXnGkQgoHGTibd3UYe3QhdLnVwSDLIz8u2c1uY9c X-Received: by 10.200.56.184 with SMTP id f53mr6597113qtc.39.1466101176528; Thu, 16 Jun 2016 11:19:36 -0700 (PDT) Received: from alderaan.marques ([181.91.210.250]) by smtp.googlemail.com with ESMTPSA id h28sm11901940qtc.37.2016.06.16.11.19.35 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2016 11:19:35 -0700 (PDT) To: pgsql-bugs@postgresql.org From: =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= Subject: pg_dump doesn't dump new objects created in schemas from extensions Message-ID: <409fe594-f4cc-89f5-c0d2-0a921987a864@2ndquadrant.com> Date: Thu, 16 Jun 2016 15:19:33 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) 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 I'm filling this bug report as I believe pg_dump is not generating a consistent backup when some extensions are being used (particularly, ones that create schemas, like PgQ). Here is an example: pruebas=# create extension pgq; CREATE EXTENSION pruebas=# select pgq.create_queue('personas'); create_queue -------------- 1 (1 fila) pruebas=# select pgq.create_queue('usuarios'); create_queue -------------- 1 (1 fila) pruebas=# select pgq.create_queue('usuarios_activos'); create_queue -------------- 1 (1 fila) pruebas=# select pgq.create_queue('usuarios_inactivos'); create_queue -------------- 1 (1 fila) pruebas=# select count(*) from pgq.tick; count ------- 4 (1 fila) pruebas=# \dt pgq.* Listado de relaciones Esquema | Nombre | Tipo | Dueño ---------+----------------+-------+---------- pgq | consumer | tabla | postgres pgq | event_1 | tabla | postgres pgq | event_1_0 | tabla | postgres pgq | event_1_1 | tabla | postgres pgq | event_1_2 | tabla | postgres pgq | event_2 | tabla | postgres pgq | event_2_0 | tabla | postgres pgq | event_2_1 | tabla | postgres pgq | event_2_2 | tabla | postgres pgq | event_3 | tabla | postgres pgq | event_3_0 | tabla | postgres pgq | event_3_1 | tabla | postgres pgq | event_3_2 | tabla | postgres pgq | event_4 | tabla | postgres pgq | event_4_0 | tabla | postgres pgq | event_4_1 | tabla | postgres pgq | event_4_2 | tabla | postgres pgq | event_template | tabla | postgres pgq | queue | tabla | postgres pgq | retry_queue | tabla | postgres pgq | subscription | tabla | postgres pgq | tick | tabla | postgres (22 filas) And just to add something else into the whole annoyance, I'll add a user defined table: pruebas=# create table pgq.test_pgq_dumpable (id int primary key); CREATE TABLE pruebas=# \dt pgq.test_pgq_dumpable Listado de relaciones Esquema | Nombre | Tipo | Dueño ---------+-------------------+-------+---------- pgq | test_pgq_dumpable | tabla | postgres (1 fila) To check that all objects from the pgq schema were dumped, I just pipe the pg_dump to psql on a new DB: -bash-4.3$ pg_dump pruebas | psql -d pruebas_pgq Now, let's check what we have on this new DB: pruebas_pgq=# \dt pgq.test_pgq_dumpable No se encontraron relaciones coincidentes. pruebas_pgq=# \dt pgq.* Listado de relaciones Esquema | Nombre | Tipo | Dueño ---------+----------------+-------+---------- pgq | consumer | tabla | postgres pgq | event_template | tabla | postgres pgq | queue | tabla | postgres pgq | retry_queue | tabla | postgres pgq | subscription | tabla | postgres pgq | tick | tabla | postgres (6 filas) This problem came up due to a difference between pg_dump on 9.1.12 and 9.1.22 (before is dumped all the tables and sequences and with the new point release is doesn't anymore), but here I'm using 9.5.3: pruebas_pgq=# select version(); version --------------------------------------------------------------------------------------------------------- PostgreSQL 9.5.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6), 64-bit (1 fila) Regards, -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, 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