pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Дмитрий Иванов <firstdismay@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: pg_dump insert column GENERATED
Date: Mon, 22 Nov 2021 08:11:51 -0800
Message-ID: <098e52bc-31d0-a4e8-adcb-0f039f771308@aklaver.com> (raw)
In-Reply-To: <CAPL5KHqi+8zRDYXaH5TC42STPDrfRPVv+97--7OD4URPTFmxgg@mail.gmail.com>
References: <CAPL5KHrkBniyQt5e1rafm5DdXvbgiiqfEQEJ9GjtVzN71Jj5pA@mail.gmail.com>
	<d0d559a9-f5f8-dcb6-673c-edeb64f6cf65@aklaver.com>
	<CAPL5KHqj6Tixp5vc4gye7SG6czfSu1ctLVPRd+-sXE0DAN5tYQ@mail.gmail.com>
	<2ea33714-149f-f614-4cdb-012f252d57c0@aklaver.com>
	<CAPL5KHqpj+MZKS6hC-i0T3DynTEJf00J4oPFgKw+KSO9axz9jg@mail.gmail.com>
	<a3ba4919-107b-1ec9-64e4-fb1f77bd2163@aklaver.com>
	<CAPL5KHqxyp2Rd+NQVYVVNd_4xz9jdtYM+JJK3-ys9dQ5j=W7Pg@mail.gmail.com>
	<a978d4ee-905a-1321-f103-d055f08dfbea@aklaver.com>
	<CAPL5KHobYgdgLj0E0ppUp1Y7MDf9QQX2V+hb7uxKM6E-TWKJsQ@mail.gmail.com>
	<15ee1aef-6b36-dc58-a610-b0f665ac652a@aklaver.com>
	<CAPL5KHqi+8zRDYXaH5TC42STPDrfRPVv+97--7OD4URPTFmxgg@mail.gmail.com>

On 11/22/21 03:32, Дмитрий Иванов wrote:
> Got it.
> 
> 
>      >You are going need to provide more information about the above:
>      >1) Define regular results.
>      >2) The query used.
>      >3) The outcome vs what you expected.
> 
> I will continue to experiment. The question is which option is better 
> (this would reduce the number of options):
> pd_dump is the source server;
> pg_restore - receiver server;
> or
> pd_dump - receiver server;
> pg_restore - server-receiver;

pg_dump is backwards compatible not forwards.

In the explanations below Postgres versioning(major/minor) is determined as:

Pre-version 10:

X.x.x

10+:

X.x

Where  X is major and x is minor.

This means if are moving forwards in Postgres major version then:

1) Use pg_dump from newer version of Postgres to dump from older version 
of Postgres. In your case pg_dump(v14) dump Postgres server v12.

2) To restore use the version of pg_restore for the Postgres version you 
are restoring to. In your case pg_restore(v14).

Staying on the same version:

1) Use the pg_dump/pg_restore for the version your are on.

2) If you are moving from one minor release to another then it would be 
better to use the latest minor release version to get any bug fixes.

Going backwards from newer version to older version:

This is not supported.

-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (20+ messages)  latest in thread

Message-ID: <098e52bc-31d0-a4e8-adcb-0f039f771308@aklaver.com>
Permalink:  ../098e52bc-31d0-a4e8-adcb-0f039f771308@aklaver.com/
Also on:    postgresql.org/message-id/098e52bc-31d0-a4e8-adcb-0f039f771308@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, firstdismay@gmail.com
  Subject: Re: pg_dump insert column GENERATED
  In-Reply-To: <098e52bc-31d0-a4e8-adcb-0f039f771308@aklaver.com>
  References: <CAPL5KHrkBniyQt5e1rafm5DdXvbgiiqfEQEJ9GjtVzN71Jj5pA@mail.gmail.com> <d0d559a9-f5f8-dcb6-673c-edeb64f6cf65@aklaver.com> <CAPL5KHqj6Tixp5vc4gye7SG6czfSu1ctLVPRd+-sXE0DAN5tYQ@mail.gmail.com> <2ea33714-149f-f614-4cdb-012f252d57c0@aklaver.com> <CAPL5KHqpj+MZKS6hC-i0T3DynTEJf00J4oPFgKw+KSO9axz9jg@mail.gmail.com> <a3ba4919-107b-1ec9-64e4-fb1f77bd2163@aklaver.com> <CAPL5KHqxyp2Rd+NQVYVVNd_4xz9jdtYM+JJK3-ys9dQ5j=W7Pg@mail.gmail.com> <a978d4ee-905a-1321-f103-d055f08dfbea@aklaver.com> <CAPL5KHobYgdgLj0E0ppUp1Y7MDf9QQX2V+hb7uxKM6E-TWKJsQ@mail.gmail.com> <15ee1aef-6b36-dc58-a610-b0f665ac652a@aklaver.com> <CAPL5KHqi+8zRDYXaH5TC42STPDrfRPVv+97--7OD4URPTFmxgg@mail.gmail.com> <098e52bc-31d0-a4e8-adcb-0f039f771308@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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