pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres question
5+ messages / 5 participants
[nested] [flat]

* Postgres question
@ 2020-11-06 22:02 Ron Watkins <rwatki@gmail.com>
  2020-11-06 22:05 ` Re: Postgres question Holger Jakobs <holger@jakobs.com>
  2020-11-06 22:07 ` Re: Postgres question David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Ron Watkins @ 2020-11-06 22:02 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Newbie to postgres here. We have Postgres 11 server at work and we need to
copy a database contents from a TEST server to a PROD server. I was looking
at pg_dump, but I heard it doesn't work with binary (blob) data? Can
someone clarify how to copy a database contents from one server to another
server?
Ron

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres question
  2020-11-06 22:02 Postgres question Ron Watkins <rwatki@gmail.com>
@ 2020-11-06 22:05 ` Holger Jakobs <holger@jakobs.com>
  2020-11-06 22:13   ` Re: Postgres question Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 5+ messages in thread

From: Holger Jakobs @ 2020-11-06 22:05 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hi,

Of course pg_dump can also dump blobs, and it's even the default. You 
may use the option --no-blobs to leave them out.

A glance at the man page can be more informative than just hearing 
something from someone.

Regards,

Holger

Am 06.11.20 um 23:02 schrieb Ron Watkins:
> Newbie to postgres here. We have Postgres 11 server at work and we 
> need to copy a database contents from a TEST server to a PROD server. 
> I was looking at pg_dump, but I heard it doesn't work with binary 
> (blob) data? Can someone clarify how to copy a database contents from 
> one server to another server?
> Ron

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

Attachments:

  OpenPGP_0x8A579C93B31961BA.asc (application/pgp-keys, 16.5K) download

  OpenPGP_signature (application/pgp-signature, 202B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres question
  2020-11-06 22:02 Postgres question Ron Watkins <rwatki@gmail.com>
  2020-11-06 22:05 ` Re: Postgres question Holger Jakobs <holger@jakobs.com>
@ 2020-11-06 22:13   ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-11-09 16:41     ` Re: Postgres question Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2020-11-06 22:13 UTC (permalink / raw)
  To: Holger Jakobs <holger@jakobs.com>; +Cc: pgsql-admin@lists.postgresql.org, Ron Watkins <rwatki@gmail.com>

Holger Jakobs <holger@jakobs.com> writes:
> Of course pg_dump can also dump blobs, and it's even the default. You 
> may use the option --no-blobs to leave them out.
> A glance at the man page can be more informative than just hearing 
> something from someone.

Especially information as out of date as that :-(.  Glancing at the
commit log, the very first version of pg_dump (in PG 7.0) did not do
blobs, but that was fixed by 7.1.  I have a vague recollection that
--no-blobs might've been the default for a while after that, but
certainly it's been well over a decade since it wasn't default.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres question
  2020-11-06 22:02 Postgres question Ron Watkins <rwatki@gmail.com>
  2020-11-06 22:05 ` Re: Postgres question Holger Jakobs <holger@jakobs.com>
  2020-11-06 22:13   ` Re: Postgres question Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-11-09 16:41     ` Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 5+ messages in thread

From: Laurenz Albe @ 2020-11-09 16:41 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Holger Jakobs <holger@jakobs.com>; +Cc: pgsql-admin@lists.postgresql.org, Ron Watkins <rwatki@gmail.com>

On Fri, 2020-11-06 at 17:13 -0500, Tom Lane wrote:
> Holger Jakobs <holger@jakobs.com> writes:
> 
> > Of course pg_dump can also dump blobs, and it's even the default. You 
> > may use the option --no-blobs to leave them out.
> > A glance at the man page can be more informative than just hearing 
> > something from someone.
> 
> Especially information as out of date as that :-(.  Glancing at the
> commit log, the very first version of pg_dump (in PG 7.0) did not do
> blobs, but that was fixed by 7.1.  I have a vague recollection that
> --no-blobs might've been the default for a while after that, but
> certainly it's been well over a decade since it wasn't default.

The exception is when except when --schema, --table, or --schema-only
is specified.  Then you have to use --blobs to get the large objects
in the dump.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres question
  2020-11-06 22:02 Postgres question Ron Watkins <rwatki@gmail.com>
@ 2020-11-06 22:07 ` David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: David G. Johnston @ 2020-11-06 22:07 UTC (permalink / raw)
  To: Ron Watkins <rwatki@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

On Fri, Nov 6, 2020 at 3:02 PM Ron Watkins <rwatki@gmail.com> wrote:

> I was looking at pg_dump, but I heard it doesn't work with binary (blob)
> data?
>

Better to read the documentation instead of relying on general heresay.

pg_dump --blobs # "Include large objects in the dump. This is the default
behavior except..."

Though I would question whether your concept of "binary (blob) data" and
"large objects" are the same.

David J.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2020-11-09 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 22:02 Postgres question Ron Watkins <rwatki@gmail.com>
2020-11-06 22:05 ` Holger Jakobs <holger@jakobs.com>
2020-11-06 22:13   ` Tom Lane <tgl@sss.pgh.pa.us>
2020-11-09 16:41     ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-11-06 22:07 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox