pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
schema update?
3+ messages / 3 participants
[nested] [flat]

* schema update?
@ 2018-06-15 10:06 czezz <czezz@o2.pl>
  2018-06-15 10:21 ` Re: schema update? Pavan Teja <pavan.postgresdba@gmail.com>
  2018-06-15 11:40 ` Re: schema update? Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 2 replies; 3+ messages in thread

From: czezz @ 2018-06-15 10:06 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

Hi everyone,   By executing following I copy schema from Machine1:  pg_dump -s &lt;database name&gt; &gt; pg_dump_text_filename   and then at the psql prompt I can restore it on the Machine2:  \i &lt;pg_dump_text_file_path&gt;    That works good.  However, is there a way to apply only differences of schema on Machine2 ?  In other words to update schema with changes from Machine1?   Best regards,  czezz

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

* Re: schema update?
  2018-06-15 10:06 schema update? czezz <czezz@o2.pl>
@ 2018-06-15 10:21 ` Pavan Teja <pavan.postgresdba@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Pavan Teja @ 2018-06-15 10:21 UTC (permalink / raw)
  To: czezz <czezz@o2.pl>; +Cc: pgsql-admin@lists.postgresql.org

Hi Czezz,

I think you can't. What you could do, is setting up WAL archiving to make
incremental backups:
http://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL

Instead you can set streaming replication between both machines

On Fri, Jun 15, 2018, 3:37 PM czezz <czezz@o2.pl> wrote:

> Hi everyone,
>
> By executing following I copy schema from Machine1:
> pg_dump -s <database name> > pg_dump_text_filename
>
> and then at the psql prompt I can restore it on the Machine2:
> \i <pg_dump_text_file_path>
>
>
> That works good.
> However, is there a way to apply only differences of schema on Machine2 ?
> In other words to update schema with changes from Machine1?
>
> Best regards,
> czezz
>

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

* Re: schema update?
  2018-06-15 10:06 schema update? czezz <czezz@o2.pl>
@ 2018-06-15 11:40 ` Scott Ribe <scott_ribe@elevated-dev.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Scott Ribe @ 2018-06-15 11:40 UTC (permalink / raw)
  To: czezz <czezz@o2.pl>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>

Nothing built in. So, assuming streaming replication doesn't work for you because these systems have different data, you have two choices:

- track schema changes as any other source so you have the change DDL available
- use a 3rd-party tool

--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/



> On Jun 15, 2018, at 4:06 AM, czezz <czezz@o2.pl> wrote:
> 
> However, is there a way to apply only differences of schema on Machine2 ?
> In other words to update schema with changes from Machine1?
> 





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


end of thread, other threads:[~2018-06-15 11:40 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-15 10:06 schema update? czezz <czezz@o2.pl>
2018-06-15 10:21 ` Pavan Teja <pavan.postgresdba@gmail.com>
2018-06-15 11:40 ` Scott Ribe <scott_ribe@elevated-dev.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