Re: pg_dump and pg_restore and foreign keys

2021-10-28 Thread Tore Halvorsen
In case someone else needs to do this - I ended up with this change in pg_dump.c around lines 17080-17090 I guess a proper solution would check the already invalid foreign keys in a different way. appendPQExpBuffer(q, "ADD CONSTRAINT %s %s%s;\n", fmtId(coninfo->dobj.name), coninfo->condef , d

Re: WAL File Recovery on Standby Server Stops Before End of WAL Files

2021-10-28 Thread Kyotaro Horiguchi
At Thu, 28 Oct 2021 13:52:36 +, "Ryan, Les" wrote in > Hi Kyotaro and Dilip, > > Thank you for getting back to me. > > Kyotaro: I ran pg_dump and the output was "pg_waldump: fatal: could not read > file "00010419005A": read 50 of 8192". I'm guessing that it > means that wal f

Re: database designs ERDs

2021-10-28 Thread Zahid Rahman
> Something like this maybe? > http://databaseanswers.org/data_models/index_all_models.htm DEFINITELY exactly this. A lot of Respect. Best Regards Zahid On Thu, 28 Oct 2021, 15:45 Thomas Kellerer, wrote: > Zahid Rahman schrieb am 28.10.2021 um 12:58: > > I am looking for some databas

Re: Incremental backup

2021-10-28 Thread Mladen Gogala
On 10/28/21 18:07, Andreas Joseph Krogh wrote: I think everybody agrees that incremental backup /per database/, and not cluster-wide, is nice, and it would be nice if PG supported it. But, given the way PG is architectured, having cluster-wide WALs, that's not an easy task to implement. Repea

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 5:07 PM, Andreas Joseph Krogh wrote: På torsdag 28. oktober 2021 kl. 23:09:19, skrev Ron mailto:ronljohnso...@gmail.com>>: [...] It's still a bunch of transaction logs, whereas differential and incremental backups only backup the changed pages, no matter how many tim

Re: Incremental backup

2021-10-28 Thread Andreas Joseph Krogh
På torsdag 28. oktober 2021 kl. 23:09:19, skrev Ron mailto:ronljohnso...@gmail.com>>: [...] It's still a bunch of transaction logs, whereas differential and incremental backups only backup the changed pages, no matter how many times they've been changed. That's a serious reduction in disk sp

Re: How to Resolve Data Being Truncated or Rounded Up During PostgreSQL Migration from v9.623 to v12.8?

2021-10-28 Thread Hilbert, Karin
Thanks for the explanation, Tom. 🙂 From: Tom Lane Sent: Thursday, October 28, 2021 11:04 AM To: Hilbert, Karin Cc: pgsql-general@lists.postgresql.org Subject: Re: How to Resolve Data Being Truncated or Rounded Up During PostgreSQL Migration from v9.623 to v12.8

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 3:08 PM, Bruce Momjian wrote: On Thu, Oct 28, 2021 at 02:23:39PM -0500, Ron wrote: On 10/28/21 2:06 PM, Adrian Klaver wrote: On 10/28/21 11:48, Ron wrote: On 10/28/21 1:00 PM, Adrian Klaver wrote: On 10/28/21 10:51, Ron wrote: Not doable in Postgresql because WAL files are globa

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 3:43 PM, Adrian Klaver wrote: On 10/28/21 12:23, Ron wrote: On 10/28/21 2:06 PM, Adrian Klaver wrote: On 10/28/21 11:48, Ron wrote: " Logical replication is built with an architecture similar to physical streaming replication (see Section 27.2.5). It is implemented by “walsender”

Re: Model clause and

2021-10-28 Thread Michael Lewis
Mea culpa. "PostgreSQL currently implements only stored generated columns." I should re-read what I share references to rather than trust my memory, particularly while sick. Thanks for kindly correcting.

Re: Model clause and

2021-10-28 Thread Thomas Kellerer
Michael Lewis schrieb am 28.10.2021 um 22:44: On Thu, Oct 28, 2021 at 1:57 PM SQL Padawan mailto:sql_pada...@protonmail.com>> wrote: I presume that VIRTUAL GENERATED columns are on the to-do list? https://www.postgresql.org/docs/current/ddl-generated-columns.html Is this not what you want

Re: Model clause and

2021-10-28 Thread Michael Lewis
On Thu, Oct 28, 2021 at 1:57 PM SQL Padawan wrote: > I presume that VIRTUAL GENERATED columns are on the to-do list? > https://www.postgresql.org/docs/current/ddl-generated-columns.html Is this not what you want?

Re: Incremental backup

2021-10-28 Thread Adrian Klaver
On 10/28/21 12:23, Ron wrote: On 10/28/21 2:06 PM, Adrian Klaver wrote: On 10/28/21 11:48, Ron wrote: On 10/28/21 1:00 PM, Adrian Klaver wrote: On 10/28/21 10:51, Ron wrote: " Logical replication is built with an architecture similar to physical streaming replication (see Section 27.2.5

Re: Incremental backup

2021-10-28 Thread Bruce Momjian
On Thu, Oct 28, 2021 at 02:23:39PM -0500, Ron wrote: > On 10/28/21 2:06 PM, Adrian Klaver wrote: > > On 10/28/21 11:48, Ron wrote: > > > On 10/28/21 1:00 PM, Adrian Klaver wrote: > > > > On 10/28/21 10:51, Ron wrote: > > > > > > > > > Not doable in Postgresql because WAL files are global to clust

Re: Model clause and

2021-10-28 Thread SQL Padawan
That's Dimitri Fontaine - I don't know him personally and didn't mean to be impolite by referring to him by his first name - typo really! SQLP Sent with [ProtonMail](https://protonmail.com/) Secure Email. ‐‐‐ Original Message ‐‐‐ On Thursday, October 28th, 2021 at 20:57, SQL Padawan w

Model clause and

2021-10-28 Thread SQL Padawan
Good evening everybody. Are there any plans to emulate Oracle MODEL clause in PostgreSQL? If not, why not? It doesn't appear to have gained much traction even in the Oracle world? Also, are there any plans to introduce the MATCH_RECOGNIZE functionality? I read an interview with Dimitri and he

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 2:06 PM, Adrian Klaver wrote: On 10/28/21 11:48, Ron wrote: On 10/28/21 1:00 PM, Adrian Klaver wrote: On 10/28/21 10:51, Ron wrote: Not doable in Postgresql because WAL files are global to cluster. I've read multiple times that will not be changed. Yet somehow logical replicat

Re: Incremental backup

2021-10-28 Thread Adrian Klaver
On 10/28/21 11:48, Ron wrote: On 10/28/21 1:00 PM, Adrian Klaver wrote: On 10/28/21 10:51, Ron wrote: Not doable in Postgresql because WAL files are global to cluster. I've read multiple times that will not be changed. Yet somehow logical replication does it: https://www.postgresql.org/do

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 1:00 PM, Adrian Klaver wrote: On 10/28/21 10:51, Ron wrote: Except we have no way of knowing what the situation is. I prefer not to assume a context. You make it sound like incremental (and differential) backups are some complicated thing that needs context.  That's utter and c

Re: Incremental backup

2021-10-28 Thread Adrian Klaver
On 10/28/21 10:51, Ron wrote: Except we have no way of knowing what the situation is. I prefer not to assume a context. You make it sound like incremental (and differential) backups are some complicated thing that needs context.  That's utter and complete rubbish in every Enterprise RDBMS

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 11:40 AM, Adrian Klaver wrote: On 10/28/21 09:25, Ron wrote: On 10/28/21 10:36 AM, Adrian Klaver wrote: On 10/28/21 05:23, Edu Gargiulo wrote: Hi all, Is there any way to make incremental backups in postgres-12? It would helpful to be more explicit about what you are trying to a

Re: Incremental backup

2021-10-28 Thread Paul Jungwirth
On 10/28/21 5:23 AM, Edu Gargiulo wrote: Is there any way to make incremental backups in postgres-12? wal-e and wal-g are useful tools for this and easy to set up. They take periodic full backups and then also continuously archive WAL files. To restore they apply the last full backup and then

Re: Incremental backup

2021-10-28 Thread Adrian Klaver
On 10/28/21 09:25, Ron wrote: On 10/28/21 10:36 AM, Adrian Klaver wrote: On 10/28/21 05:23, Edu Gargiulo wrote: Hi all, Is there any way to make incremental backups in postgres-12? It would helpful to be more explicit about what you are trying to achieve. Do you want: 1) A continuous pro

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 10:36 AM, Adrian Klaver wrote: On 10/28/21 05:23, Edu Gargiulo wrote: Hi all, Is there any way to make incremental backups in postgres-12? It would helpful to be more explicit about what you are trying to achieve. Do you want: 1) A continuous process or scheduled one? 2) Local

Re: Incremental backup

2021-10-28 Thread Edu Gargiulo
On Thu, Oct 28, 2021 at 12:36 PM Adrian Klaver wrote: > On 10/28/21 05:23, Edu Gargiulo wrote: > > Hi all, > > > > Is there any way to make incremental backups in postgres-12? > > It would helpful to be more explicit about what you are trying to achieve. > > Do you want: > > 1) A continuous proce

Re: Incremental backup

2021-10-28 Thread Adrian Klaver
On 10/28/21 05:23, Edu Gargiulo wrote: Hi all, Is there any way to make incremental backups in postgres-12? It would helpful to be more explicit about what you are trying to achieve. Do you want: 1) A continuous process or scheduled one? 2) Local or remote backups? 3) The backup as a stand

Re: Incremental backup

2021-10-28 Thread Ivan E. Panchenko
On 28.10.2021 15:58, Ron wrote: On 10/28/21 7:23 AM, Edu Gargiulo wrote: Hi all, Is there any way to make incremental backups in postgres-12? Using pg_dump?  No. Using pgBackRest?  Yes. https://github.com/postgrespro/pg_probackup --

Re: How to Resolve Data Being Truncated or Rounded Up During PostgreSQL Migration from v9.623 to v12.8?

2021-10-28 Thread Adrian Klaver
On 10/28/21 07:44, Hilbert, Karin wrote: I manage aPostgreSQL databases - we currently have clusters on *PostgreSQL v9.6.23* & **PostgreSQL v12.8**. Our database clusters are on Linux VMs, with OS:   Flavor:*redhat_7*   Release: *3.10.0-1160.45.1.el7.x86_64* We have repmgr clusters of 1 Prima

Re: How to Resolve Data Being Truncated or Rounded Up During PostgreSQL Migration from v9.623 to v12.8?

2021-10-28 Thread Tom Lane
"Hilbert, Karin" writes: > [ PG12 displays float values a tad differently from 9.6 ] This is not a bug; we just changed the behavior of the "extra_float_digits" display option, so that it's less likely to print garbage digits. A float4 value only has about six decimal digits of precision to begi

Re: database designs ERDs

2021-10-28 Thread Thomas Kellerer
Zahid Rahman schrieb am 28.10.2021 um 12:58: > I am looking for some database designs (ERD) on current and up to date > business scenarios for a project. > > By update to date I am referring to the DVD rental business ERD, > https://www.postgresqltutorial.com/wp-content/uploads/2018/03/printable-po

How to Resolve Data Being Truncated or Rounded Up During PostgreSQL Migration from v9.623 to v12.8?

2021-10-28 Thread Hilbert, Karin
I manage a PostgreSQL databases - we currently have clusters on PostgreSQL v9.6.23 & PostgreSQL v12.8. Our database clusters are on Linux VMs, with OS: Flavor: redhat_7 Release: 3.10.0-1160.45.1.el7.x86_64 We have repmgr clusters of 1 Primary & 2 Standby servers & use another server with PgB

RE: WAL File Recovery on Standby Server Stops Before End of WAL Files

2021-10-28 Thread Ryan, Les
Hi Kyotaro and Dilip, Thank you for getting back to me. Kyotaro: I ran pg_dump and the output was "pg_waldump: fatal: could not read file "00010419005A": read 50 of 8192". I'm guessing that it means that wal file 00010419005A is corrupted and that is why the recovery p

Re: Incremental backup

2021-10-28 Thread Ron
On 10/28/21 7:23 AM, Edu Gargiulo wrote: Hi all, Is there any way to make incremental backups in postgres-12? Using pg_dump?  No. Using pgBackRest?  Yes. -- Angular momentum makes the world go 'round.

Incremental backup

2021-10-28 Thread Edu Gargiulo
Hi all, Is there any way to make incremental backups in postgres-12? Kind regards, -- Eduardo

database designs ERDs

2021-10-28 Thread Zahid Rahman
Hi, I am looking for some database designs (ERD) on current and up to date business scenarios for a project. By update to date I am referring to the DVD rental business ERD, https://www.postgresqltutorial.com/wp-content/uploads/2018/03/printable-postgresql-sample-database-diagram.pdf Although co

Re: jsonb: unwrapping text

2021-10-28 Thread tomas
On Wed, Oct 27, 2021 at 04:18:20PM -0700, David G. Johnston wrote: > On Wed, Oct 27, 2021 at 11:58 AM wrote: > > > > > I've found out that one can treat a string singleton as if it > > were an array: > > > > foo=# select '"foo"'::jsonb ->> 0; > >?column? > > -- > >foo > > (1