Trigger not firing

2020-05-31 Thread Hans
Hi, I've had a weird problem in a production system. The customer had installed a new server with our software on it. The software installs a Postgres database schema that includes a number of triggers. The triggers perform inserts into an additional table. In this installation, from what I

Re: Oracle vs. PostgreSQL - a comment

2020-05-31 Thread Tim Cross
Paul Förster writes: > and then, some day, a developer approaches a DBA with a query which is > generated and, if printed out in a 11pt. sized font, can fill a billboard on > a street, to optimize it or search for what's wrong with it, or why it > performs so slow... That's usually when I pl

Re: Postgresql 9.6 -> AWS RDS Postgresql 12.2 with pg_logical

2020-05-31 Thread Ben Chobot
Igor Polishchuk wrote on 5/30/20 9:33 PM: Hello, I need to replicate Postgresql 9.6 to  AWS RDS Postgresql 12.2 with pg_logical. AWS RDS Pg 12.2 (target) only supports pg_logical 2.3.0. Can I use v2.3.1 on the source and v2.3.0 on the target? We had lots of issues with pglogical when we accid

pg_dump of database with numerous objects

2020-05-31 Thread tony
I have always used pg_basebackup to backup my database and I have never had any issues. I am now needing to upgrade to a new version of PostgreSQL and I am running into problems when pg_upgrade calls pg_dump. pg_dump stalled at: "pg_dump: saving database definition" for 24 hours before I kille

Re: Oracle vs. PostgreSQL - a comment

2020-05-31 Thread Paul Förster
Hi Tim, > On 31. May, 2020, at 15:26, Tim Cross wrote: > P.S. for moving Oracle databases, we use to just use sed and change the > paths in the control file. Worked remarkably well. Often used this > technique to 'refresh' our dev or testing systems to current prod data. it works well if the le

Re: Trigger not firing

2020-05-31 Thread Adrian Klaver
On 5/31/20 6:19 AM, Hans wrote: Hi, I've had a weird problem in a production system. The customer had installed a new server with our software on it. The software installs a Postgres database schema that includes a number of triggers. The triggers perform inserts into an additional table.

Re: pg_dump of database with numerous objects

2020-05-31 Thread Adrian Klaver
On 5/31/20 8:05 AM, t...@exquisiteimages.com wrote: I have always used pg_basebackup to backup my database and I have never had any issues. I am now needing to upgrade to a new version of PostgreSQL and I am running into problems when pg_upgrade calls pg_dump. pg_dump stalled at: "pg_dump: sa

Re: pg_dump of database with numerous objects

2020-05-31 Thread tony
On 2020-05-31 11:24, Adrian Klaver wrote: On 5/31/20 8:05 AM, t...@exquisiteimages.com wrote: I have always used pg_basebackup to backup my database and I have never had any issues. I am now needing to upgrade to a new version of PostgreSQL and I am running into problems when pg_upgrade calls

Re: pg_dump of database with numerous objects

2020-05-31 Thread Christophe Pettus
> On May 31, 2020, at 08:05, t...@exquisiteimages.com wrote: > > My pg_class table contains 9,000,000 entries and I have 9004 schema. Which version of pg_dump are you running? Older versions (don't have the precise major version in front of me) have N^2 behavior on the number of database ob

How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Andrus
Hi! pg_basebackup takes 8 hours. After it is finished, replication slave does not start: LOG: consistent recovery state reached at 2DE/985A5BE0 LOG: database system is ready to accept read only connections LOG: started streaming WAL from primary at 2DE/9900 on timeline 1 replikaator@[unk

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Adrian Klaver
On 5/31/20 12:47 PM, Andrus wrote: Hi! pg_basebackup takes 8 hours. After it is finished,  replication slave does not start: LOG:  consistent recovery state reached at 2DE/985A5BE0 LOG:  database system is ready to accept read only connections LOG:  started streaming WAL from primary at 2DE/990

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Paul Förster
Hi Andrus, > On 31. May, 2020, at 21:47, Andrus wrote: > replikaator@[unknown] ERROR: requested WAL segment 000102CF00E9 > has already been removed the message says it all. You need to copy the WAL file 000102CF00E9 and newer to the replica's pg_wal directory because i

Re: pg_dump of database with numerous objects

2020-05-31 Thread tony
On 2020-05-31 13:08, Christophe Pettus wrote: On May 31, 2020, at 08:05, t...@exquisiteimages.com wrote: My pg_class table contains 9,000,000 entries and I have 9004 schema. Which version of pg_dump are you running? Older versions (don't have the precise major version in front of me) have N^2

Re: pg_dump of database with numerous objects

2020-05-31 Thread Christophe Pettus
> On May 31, 2020, at 13:10, t...@exquisiteimages.com wrote: > > On 2020-05-31 13:08, Christophe Pettus wrote: >>> On May 31, 2020, at 08:05, t...@exquisiteimages.com wrote: >>> My pg_class table contains 9,000,000 entries and I have 9004 schema. >> Which version of pg_dump are you running? Ol

Re: pg_dump of database with numerous objects

2020-05-31 Thread Adrian Klaver
On 5/31/20 1:13 PM, Christophe Pettus wrote: On May 31, 2020, at 13:10, t...@exquisiteimages.com wrote: On 2020-05-31 13:08, Christophe Pettus wrote: On May 31, 2020, at 08:05, t...@exquisiteimages.com wrote: My pg_class table contains 9,000,000 entries and I have 9004 schema. Which version

Re: pg_dump of database with numerous objects

2020-05-31 Thread Christophe Pettus
> On May 31, 2020, at 13:37, Adrian Klaver wrote: > > Just a reminder that the OP's original issue was with using pg_upgrade. True, although IIRC pg_ugprade uses pg_dump under the hood to do the schema migration. -- -- Christophe Pettus x...@thebuild.com

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Andrus
Hi! On 31. May, 2020, at 21:47, Andrus wrote: replikaator@[unknown] ERROR: requested WAL segment 000102CF00E9 has already been removed the message says it all. You need to copy the WAL file 000102CF00E9 and newer to the replica's pg_wal directory because it has been r

Re: pg_dump of database with numerous objects

2020-05-31 Thread Adrian Klaver
On 5/31/20 1:38 PM, Christophe Pettus wrote: On May 31, 2020, at 13:37, Adrian Klaver wrote: Just a reminder that the OP's original issue was with using pg_upgrade. True, although IIRC pg_ugprade uses pg_dump under the hood to do the schema migration. Again true, but pg_upgrade will not

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Andrus
Hi! I'm guessing are looking for: https://www.postgresql.org/docs/12/runtime-config-replication.html 26.2.6. Replication Slots Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by all standbys, and that the master do

Re: PG server process can keep some info of backend

2020-05-31 Thread Michel Pelletier
Not sure exactly what you're asking for, but perhaps check out https://www.postgresql.org/docs/current/monitoring.html On Fri, May 29, 2020 at 12:58 AM brajmohan saxena wrote: > > Hi, > > Is there any extension or option in PG to keep information of any ( > memory context/some memory address) of

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Adrian Klaver
On 5/31/20 2:03 PM, Andrus wrote: Hi! I'm guessing are looking for: https://www.postgresql.org/docs/12/runtime-config-replication.html 26.2.6. Replication Slots Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by al

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Adrian Klaver
On 5/31/20 2:03 PM, Andrus wrote: Hi! I'm guessing are looking for: https://www.postgresql.org/docs/12/runtime-config-replication.html 26.2.6. Replication Slots Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by al

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Paul Förster
Hi Andrus, > On 31. May, 2020, at 22:56, Andrus wrote: > wal files are not archieved. IMHO a bad decision. They should be. Now you're in the situation where you see why. > I have tried to re-initiate replica serveral times in low-use time but this > error occurs again. remove the whole repli

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Andrus
Hi! In addition to my most recent questions: What are you trying to achieve? I want to create hot standby async server using /etc/init.d/postgresql stop mv /var/lib/postgresql/12/main /var/lib/postgresql/12/mainold pg_basebackup --write-recovery-conf -D /var/lib/postgresql/12/main chmod --

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Andrus
Hi! Will wal_keep_segments keep segments also if named replication slot is lot used ? Well if you are using a replication slot there is no point in using wal_keep_segments. Slots where created in, part at least, so you did not have to guess at a wal_keep_segments number. I dont use slot. T

Re: Oracle vs. PostgreSQL - a comment

2020-05-31 Thread Stefan Keller
Hi Paul Paul Förster wrote: > Also, I like the idea of global container/cluster-wide views such as > CDB_TABLES, etc., > a thing which I definitely and seriously miss about PostgreSQL. Can you specify little more: What's the use case for this (assuming you know dblink and postgres_fdw)? :Stefa

Re: Suggestion to Monitoring Tool

2020-05-31 Thread Rene Romero Benavides
Give pgwatch2 a try: https://pgwatch.com/ On Wed, May 27, 2020 at 11:46 AM postgann2020 s wrote: > Hi Team, > > Thanks for your support. > > Environment Details: > OS: RHEL 7.2 > Postgres: 9.5.15 > Master-Slave with Streaming replication > > We are planning to implement the monitoring tool for o

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Adrian Klaver
On 5/31/20 2:43 PM, Andrus wrote: Hi! In addition to my most recent questions: What are you trying to achieve? I want to create  hot standby async server using /etc/init.d/postgresql stop mv /var/lib/postgresql/12/main /var/lib/postgresql/12/mainold pg_basebackup --write-recovery-conf -D /var

Re: Oracle vs. PostgreSQL - a comment

2020-05-31 Thread Stefan Knecht
Okay I'll bite. Comparing Postgres with Oracle is a bit like comparing a rubber duck you might buy your three year old, with a 30 ton super tanker. Do they both float? Yeah, but that's about the only similarity. The rubber duck barely tells you how and why it floats, but the super tanker is

Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated

2020-05-31 Thread Andrus
Hi! I want to create hot standby async server using /etc/init.d/postgresql stop mv /var/lib/postgresql/12/main /var/lib/postgresql/12/mainold pg_basebackup --write-recovery-conf -D /var/lib/postgresql/12/main I don't see where the base backup is being taken from just where it is going. It is