Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koMN4-000774-2a for pgsql-general@arkaria.postgresql.org; Sun, 13 Dec 2020 08:04:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1koMMV-000609-K5 for pgsql-general@arkaria.postgresql.org; Sun, 13 Dec 2020 08:04:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koMMV-000602-9x for pgsql-general@lists.postgresql.org; Sun, 13 Dec 2020 08:04:11 +0000 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1koMMS-00017V-Oi for pgsql-general@lists.postgresql.org; Sun, 13 Dec 2020 08:04:10 +0000 Received: by mail-oi1-x22c.google.com with SMTP id p126so15509916oif.7 for ; Sun, 13 Dec 2020 00:04:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=wmWk9OboY6A4UCw2raXG6dkhpgQcvyR5UUZYPeMIQa4=; b=C1TmMWoxU6qW0LeYhjI8Zgk0Toe+uvAI9AynVuLksiUj567TkGoy3dk+leSllrjBwu uu9VyQDHE77BSfFza3Z0kgzVfpkXXG+W58KC2WtIy24bLXHE3uG4ACMKlzZljeeN+RTm 4KBxJaHfcOWvndojCdYVeBiPH3JIcyhqJ7Qtl3uH7aK5IJZrlM2pBTVZE4UuYU2Dbbwr LXj69yp1weeUch/2MJvn7VRJzunbHBklpIJWw1TrGAtT9QK2XFjPtjVAX5j0yJ8YBURc kbuQdAUDOaR6YtdVSIh3t+7+o4Afs6Ls6cNwbdLAm38nJbZgqzFWVd/K6XeYW3o7p32v VEJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=wmWk9OboY6A4UCw2raXG6dkhpgQcvyR5UUZYPeMIQa4=; b=TZhSNjZHLopRCz6H/jQTyOfs+XqBwvsWvAwA8Wyv9S1sFSM/3weNjmGUiYHxfbCL4r o4wpXTN4XRBtKfaLiBSQt9P6gdrhHhiMj5ZONjWXWB6p8Rquvokiq5omr9mLBq9u26ci NXu9NlItIq+vcdIFcKhcc9+GTBAh5PyF/rdbQ5LsWil41FR/NK9xd0TK5STz0vLiO53f xAcHo6jJ2OlYkM0+s2vjKIsV+82nHLWNO8DhzyyRfWZwtfa1owfsRSbu517pKrfU8P8F 14ZY4Sa3hWh6MYkfixs2ipOXarEjhRaNMowAPiqGwlX7rudJM8/pMDFkcsFJfZsNbIjW OgYA== X-Gm-Message-State: AOAM531EiVz7UHTmfJp6Tva5xAAN6HCdRM/1OjwaLIEr3o4nUZysM74s SvbonkyJiwWeCpfqiidXlheiHG6t+cy4QA== X-Google-Smtp-Source: ABdhPJzEU2rimAF2hc/fduayIGIP+KAVDJ4L3dNb2vjm9jCMlkLRNzmn5G48tOWilu022XwmW5nONw== X-Received: by 2002:aca:fd0d:: with SMTP id b13mr14626635oii.27.1607846646044; Sun, 13 Dec 2020 00:04:06 -0800 (PST) Received: from [192.168.1.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id m7sm3049748oou.11.2020.12.13.00.04.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 00:04:05 -0800 (PST) Subject: Re: Is there a way to dump schema to files on disk and keep them in sync To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <6aee220f-2438-5b7e-80e5-d59798581a2e@gmail.com> Date: Sun, 13 Dec 2020 02:04:04 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/12/20 8:58 PM, Tim Uckun wrote: > I want to dump my postgres schema to disk in neat directories like > pgadmin presents. Then I want to be able to edit the files and sync > changes to the database and ideally if changes were made in the > database to sync them back to the disk. That could get really time- and disk-consuming if one of those "edits" was to convert a column in a large 500M row table from numeric to text (or vice versa), or add a column to the "middle" of a table. Tricky to program, too, given all the foreign keys, partitions, etc, etc that can be part of a table. > Is there a tool that does this? Is there a tool that will dump the > schema into separate directories and files like pgadmin does? -- Angular momentum makes the world go 'round.