From: | Attila Soki <pgsql(at)attilasoki(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | WIP Patch: pg_dump structured |
Date: | 2023-03-12 20:36:36 |
Message-ID: | 58683202-75BA-47A8-A65C-A9F8F796FF06@attilasoki.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
I was looking for a way to track actual schema changes after database migrations
in a VCS. Preferably, the schema definition should come from a trusted source
like pg_dump and should consist of small files.
This patch was born out of that need.
This patch adds the structured output format to pg_dump.
This format is a plaintext output split up into multiple files and the
resulting small files are stored in a directory path based on the dumped object.
This format can be restored by feeding its plaintext toc file (restore-dump.sql)
to psql. The output is also suitable for manipulating the files with standard
editing tools.
This patch is a WIP (V1). The patch is against master and it compiles
successfully on macOS 13.2.1 aarch64 and on Debian 11 arm64.
To test, execute pg_dump --format=structured --file=/path/to/outputdir dbname
What do you think of this feature, any chance it will be added to pg_dump once
the patch is ready?
Is the chosen name "structured" appropriate?
Thanks for any feedback.
--
Attila Soki
Attachment | Content-Type | Size |
---|---|---|
v1-wip-pg_dump_structured.patch | application/octet-stream | 30.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-03-12 20:50:06 | Re: WIP Patch: pg_dump structured |
Previous Message | Tom Lane | 2023-03-12 20:14:06 | Re: Progress report of CREATE INDEX for nested partitioned tables |