Is there a way to dump schema to files on disk and keep them in sync

2020-12-12 Thread Tim Uckun
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. Is there a tool that does this? Is there a tool that will d

Re: pg_restore fails when psql succeeds

2020-12-12 Thread Cherio
I install PostgreSQL from "apt.postgresql.org" repository: $ /usr/lib/postgresql/13/bin/postgres --version postgres (PostgreSQL) 13.1 (Ubuntu 13.1-1.pgdg20.04+1) It runs in a VM, the most recent & updated version of Ubuntu LTS 20.04 $ uname -a Linux dbwfprod8-20 5.4.0-56-generic #62-Ubuntu SMP Mon

Re: pg_restore fails when psql succeeds

2020-12-12 Thread Adrian Klaver
On 12/12/20 12:10 PM, Cherio wrote: I am facing a consistent issue with pg_restore when moving databases with large tables from PostgreSQL 10 to 13. pg_restore fails to restore indexes on some large tables (anything over 20 million records). pg_restore: error: could not execute query: ERROR:  

pg_restore fails when psql succeeds

2020-12-12 Thread Cherio
I am facing a consistent issue with pg_restore when moving databases with large tables from PostgreSQL 10 to 13. pg_restore fails to restore indexes on some large tables (anything over 20 million records). pg_restore: error: could not execute query: ERROR: out of memory DETAIL: Failed on request

Re: SQL group by help

2020-12-12 Thread Alban Hertroys
> On 11 Dec 2020, at 18:24, Chris Stephens wrote: > > I'm trying to create a visual representation of a 6x8 grid of samples on a > rack using the following SQL format: > > with rack_display as ( > select sr.ts rack_ts > , sr.rack_id > , r.rack_barcode > , 1 as row_