RE: pg_dump to a remote server
Hi Ron, I have some pg_dump test result, for reference only -- [ENV] Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz | SSD 120GB | 8G memory (PostgreSQL) 9.6.8 -- [DATA] my database has 7.2GB of random data: postgres=# select pg_size_pretty(pg_database_size('postgres')); pg_size_pretty 7201 MB (1 row) -- [Test Results] command | export_time | output_size -+-+-- pg_dump postgres > outfile.sql| 16m23s | 6.3 GB pg_dump postgres | gzip > outfile.gz | 5m27s | 2.4 GB pg_dump -Fc postgres > outfile.dump| 5m33s | 2.4 GB pg_dump -Fc -Z 9 postgres > outfile.dump | 11m59s | 2.4 GB pg_dump -Ft postgres > outfile.dump | 2m43s | 6.3 GB pg_dump -Fd postgres -f dumpdir| 5m17s | 2.4 GB pg_dump -Fd -j 4 postgres -f dumpdir | 2m50s | 2.4 GB (7 rows) -- The smaller the amount of data transmitted over the network, the better. You could try compressed export method like gzip, -Fc, -Ft, -Fd -j 4(faster). -- Jack Gao jackg...@outlook.com > -Original Message- > From: Ron> Sent: Tuesday, April 17, 2018 9:44 AM > To: Adrian Klaver ; pgsql-general gene...@postgresql.org> > Subject: Re: pg_dump to a remote server > > > > On 04/16/2018 07:18 PM, Adrian Klaver wrote: > > On 04/16/2018 04:58 PM, Ron wrote: > >> We're upgrading from v8.4 to 9.6 on a new VM in a different DC. The > dump > >> file will be more than 1TB, and there's not enough disk space on the > >> current system for the dump file. > >> > >> Thus, how can I send the pg_dump file directly to the new server while > >> the pg_dump command is running? NFS is one method, but are there > others > >> (netcat, rsync)? Since it's within the same company, encryption is not > >> required. > > > > Maybe?: > > > > pg_dump -d test -U postgres -Fc | ssh aklaver@arkansas 'cat > test_cat.out' > > That looks promising. I could then "pg_restore -jX". > > -- > Angular momentum makes the world go 'round.
RE: Re:Postgresql with JDK
Hi, yes, supported. > If you are using Java 8 or newer then you should use the JDBC 4.2 version. < If you are using Java 7 then you should use the JDBC 4.1 version. If you are using Java 6 then you should use the JDBC 4.0 version. If you are using a Java version older than 6 then you will need to use a JDBC3 version of the driver, which will by necessity not be current, found in Other Versions. PostgreSQL JDBC 4.2 Driver, 42.2.2 -- Jack Gao jackg...@outlook.com > -Original Message- > From: vaibhav zaveri <vaibhavzave...@gmail.com> > Sent: Tuesday, April 17, 2018 2:47 PM > To: pgsql-gene...@postgresql.org > Subject: Re:Postgresql with JDK > > Hi, > > Yes that is the link. > But is JDK 1.8 supported by PostgreSQL?? > > Regards, > Vaibhav Zaveri > > On 17 Apr 2018 12:12 p.m., "Mail Delivery Subsystem" dae...@googlemail.com <mailto:mailer-dae...@googlemail.com> > > wrote: > > > > > Address not found > > Your message wasn't delivered to pgsl-gene...@postgresql.org because the > address couldn't be found, or is unable to receive mail. > The response was: > > > 550 unknown address > > > Final-Recipient: rfc822; pgsl-gene...@postgresql.org <mailto:pgsl- > gene...@postgresql.org> > Action: failed > Status: 5.0.0 > Remote-MTA: dns; makus.postgresql.org > <http://makus.postgresql.org> . (2001:4800:1501:1::229, the server for >the domain postgresql.org <http://postgresql.org> .) > Diagnostic-Code: smtp; 550 unknown address > Last-Attempt-Date: Mon, 16 Apr 2018 23:41:11 -0700 (PDT) > > > -- Forwarded message -- > From: vaibhav zaveri <vaibhavzave...@gmail.com > <mailto:vaibhavzave...@gmail.com> > > To: pgsl-gene...@postgresql.org <mailto:pgsl- > gene...@postgresql.org> > Cc: > Bcc: > Date: Tue, 17 Apr 2018 12:11:09 +0530 > Subject: Fwd: RE: Which jdk version is supported by PostgreSQL > > Hi, > > Yes this link. But is JDK version 1.8 supported with PostgreSQL?? > > Regards, > Vaibhav Zaveri > -- Forwarded message -- > From: "Gao Jack" <jackg...@outlook.com > <mailto:jackg...@outlook.com> > > Date: 17 Apr 2018 11:58 a.m. > Subject: RE: Which jdk version is supported by PostgreSQL > To: "vaibhav zaveri" <vaibhavzave...@gmail.com > <mailto:vaibhavzave...@gmail.com> >, "pgsql-gene...@postgresql.org > <mailto:pgsql-gene...@postgresql.org> " <pgsql-gene...@postgresql.org > <mailto:pgsql-gene...@postgresql.org> >, "pgsql_gene...@postgresql.org > <mailto:pgsql_gene...@postgresql.org> " <pgsql_gene...@postgresql.org > <mailto:pgsql_gene...@postgresql.org> > > Cc: > > > > > -Original Message- > > From: vaibhav zaveri <vaibhavzave...@gmail.com > <mailto:vaibhavzave...@gmail.com> > > > Sent: Tuesday, April 17, 2018 2:03 PM > > To: pgsql-gene...@postgresql.org <mailto:pgsql- > gene...@postgresql.org> ; pgsql_gene...@postgresql.org > <mailto:pgsql_gene...@postgresql.org> > > Subject: Which jdk version is supported by PostgreSQL > > > > Hi, > > > > Which jdk version is supported by PostgreSQL? > > > > > > Regards, > > Vaibhav Zaveri > > Hi > > Do you mean jdbc? > > postgresql supports most versions of jdbc > > https://jdbc.postgresql.org/download.html > <https://jdbc.postgresql.org/download.html> > > -- > > Jack Gao > jackg...@outlook.com <mailto:jackg...@outlook.com> > > >
RE: Which jdk version is supported by PostgreSQL
> -Original Message- > From: vaibhav zaveri> Sent: Tuesday, April 17, 2018 2:03 PM > To: pgsql-gene...@postgresql.org; pgsql_gene...@postgresql.org > Subject: Which jdk version is supported by PostgreSQL > > Hi, > > Which jdk version is supported by PostgreSQL? > > > Regards, > Vaibhav Zaveri Hi Do you mean jdbc? postgresql supports most versions of jdbc https://jdbc.postgresql.org/download.html -- Jack Gao jackg...@outlook.com
RE: pg_dump to a remote server
> -Original Message- > From: Ron> Sent: Tuesday, April 17, 2018 7:59 AM > To: pgsql-general > Subject: pg_dump to a remote server > > We're upgrading from v8.4 to 9.6 on a new VM in a different DC. The dump > file will be more than 1TB, and there's not enough disk space on the current > system for the dump file. > > Thus, how can I send the pg_dump file directly to the new server while the > pg_dump command is running? NFS is one method, but are there others > (netcat, rsync)? Since it's within the same company, encryption is not > required. > > Or would it be better to install both 8.4 and 9.6 on the new server (can I > even install 8.4 on RHEL 6.9?), rsync the live database across and then set > up log shipping, and when it's time to cut over, do an in-place pg_upgrade? > > (Because this is a batch system, we can apply the data input files to bring > the new database up to "equality" with the 8.4 production system.) > > Thanks > > -- > Angular momentum makes the world go 'round. Hi https://www.postgresql.org/docs/current/static/backup-dump.html#BACKUP-DUMP-RESTORE ... ... The ability of pg_dump and psql to write to or read from pipes makes it possible to dump a database directly from one server to another, for example: pg_dump -h host1 dbname | psql -h host2 dbname -- Jack Gao jackg...@outlook.com