Re: Pglogical 2.3.0 in AWS RDS 12.2

2020-06-01 Thread Adrian Klaver
On 6/1/20 3:33 PM, Jeremy Schneider wrote: On 6/1/20 09:39, Igor Polishchuk wrote: Hello everybody, Has anybody succeeded with using pglogical in AWS Postgresql 12.2? They have pglogical v2.3.0, and it has this issue https://github.com/2ndQuadrant/pglogical/issues/240, which was fixed in the 2.3

Re: Using JSONB with nested key-value structures, and skipping/wildcarding the key

2020-06-01 Thread Alban Hertroys
> On 1 Jun 2020, at 20:18, Shaheed Haque wrote: > > Hi, > > I'm using Django's ORM to access Postgres12. My "MyModel" table has a JSONB > column called 'snapshot'. In Python terms, each row's 'snapshot' looks like > this: > > == > snapshot = { > 'pay_definition' : {

Using JSONB with nested key-value structures, and skipping/wildcarding the key

2020-06-01 Thread Shaheed Haque
Hi, I'm using Django's ORM to access Postgres12. My "MyModel" table has a JSONB column called 'snapshot'. In Python terms, each row's 'snapshot' looks like this: == snapshot = { 'pay_definition' : { '1234': {..., 'name': 'foo', ...}, '99': {..., 'name': 'ba

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Karsten Hilbert
On Mon, Jun 01, 2020 at 12:36:14PM +0700, Stefan Knecht wrote: > The rubber duck barely tells you how and why it floats It sure doesn't spoonfeed but it certainly does tell us *exactly* how and why it floats. https://www.postgresql.org/docs/devel/install-getsource.html Best, Karsten --

Pglogical 2.3.0 in AWS RDS 12.2

2020-06-01 Thread Igor Polishchuk
Hello everybody, Has anybody succeeded with using pglogical in AWS Postgresql 12.2? They have pglogical v2.3.0, and it has this issue https://github.com/2ndQuadrant/pglogical/issues/240 , which was fixed in the 2.3.1. However, one cannot up

Re: psql12.3 + jdbc_fdw - return wrong query results by using OR

2020-06-01 Thread Ying Lu
> psql12.3 + jdbc_fdw(oracle18.x), tried: [got bad query results] > How about giving oracle_fdw a try? I will try oracle_fdw then. Thank you very much for everyone's help!

Re: Suggestion to Monitoring Tool

2020-06-01 Thread Keith Fiske
On Wed, May 27, 2020 at 12:46 PM 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 our environment. > > Could someone please su

Re: Vanishing unique constraint

2020-06-01 Thread Julien Rouhaud
On Mon, Jun 1, 2020 at 1:23 PM Bernhard Beroun wrote: > > Am Montag, Juni 01, 2020 12:56 CEST, schrieb Julien Rouhaud > : > > On Mon, Jun 1, 2020 at 11:15 AM Bernhard Beroun wrote: > > > > Hello, > > > > I am experiencing a strange thing on my production database server, which I > > can't expla

Re: Trigger not firing

2020-06-01 Thread Adrian Klaver
On 6/1/20 3:09 AM, Hans wrote: 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. How is t

Re: pg_ctl can't start db server

2020-06-01 Thread Adrian Klaver
On 6/1/20 12:04 AM, Tanja Savic wrote: Hi, @Tom Adding -D in command worked. I just used pg_ctl start -D [data-directory ] You would be better off using the tools provided to manage clusters with the Ubuntu/Debian packaging: https://wiki.debian.org/PostgreSql So as I mentioned previously:

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Ravi Krishna
Oracle is losing market share consistently and irreversibly for the last 4-5 yrs. It is not due to migration to open source RDBMS, but also due to the fact that now there are many alternatives to RDBMS for data storage. Until about 10-15 yrs back, if the application has to store data, then RDBM

Re: Vanishing unique constraint

2020-06-01 Thread Bernhard Beroun
Hello, Am Montag, Juni 01, 2020 12:56 CEST, schrieb Julien Rouhaud :  Hello, On Mon, Jun 1, 2020 at 11:15 AM Bernhard Beroun wrote: > > Hello, > > I am experiencing a strange thing on my production database server, which I > can't explain. > > On my production database server, there is a tabl

Re: Vanishing unique constraint

2020-06-01 Thread Julien Rouhaud
Hello, On Mon, Jun 1, 2020 at 11:15 AM Bernhard Beroun wrote: > > Hello, > > I am experiencing a strange thing on my production database server, which I > can't explain. > > On my production database server, there is a table called "label_suggestion" > which has a unique constraint on the "name

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

2020-06-01 Thread Paul Förster
Hi Andrus, > On 01. Jun, 2020, at 12:26, Andrus wrote: > My script does the same thing as your comands. no, it does not. And as long as you refuse to understand that, I can't help you. > I want to create replication server. no, you want to create a streaming replica. > Old cluster is empty, f

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

2020-06-01 Thread Andrus
Hi! How to create replication server ? I always do it this way and it work for me: $ pg_basebackup -h ${PGHOST} -p ${PGPORT} -U replicator -W -R -D ${PGDATA} -P -v -Fp -Xs After that, I edit ${PGDATA}/postgresql.conf and (w/ PostgreSQL 11 and older ${PGDATA}/recovery.conf) to make it do what I

Re: Trigger not firing

2020-06-01 Thread Hans
you trigger can be much faster if you replace FOREACH cycle by unnest INSERT INTO generic.usergroup_test(test_id, usergroup_id) VALUES(NEW.id, UNNEST(NEW.usergroup_ids)); Thanks! Appreciated :-) Hans

Re: Trigger not firing

2020-06-01 Thread Pavel Stehule
po 1. 6. 2020 v 12:09 odesílatel Hans napsal: > >> 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 int

Re: Trigger not firing

2020-06-01 Thread Hans
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. How is the install done? Our instructi

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Peter J. Holzer
First I have to state that I have used Oracle mostly from 8.x to 10.x and I have little experience with 11 and 12 and none with current versions. So I'm comparing Oracle from 10 years ago with current PostgreSQL, which isn't fair. On 2020-06-01 12:36:14 +0700, Stefan Knecht wrote: > Comparing Post

Vanishing unique constraint

2020-06-01 Thread Bernhard Beroun
Hello, I am experiencing a strange thing on my production database server, which I can't explain. On my production database server, there is a table called "label_suggestion" which has a unique constraint on the "name" column. If I do a "\d+ label_suggestion" I can see, that the unique constr

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

2020-06-01 Thread Magnus Hagander
On Mon, Jun 1, 2020 at 10:17 AM Andrus wrote: > Hi! > > > I have tried to re-initiate replica serveral times in low-use time but > this error occurs again. > >remove the whole replica's PGDATA/* and do a pg_basebackup again. But > before that, make sure wal_keep_segments in big enough on the > >m

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

2020-06-01 Thread Paul Förster
Hi Andrus, > On 01. Jun, 2020, at 10:17, Andrus wrote: > Shell script starts server after pg_basebackup completes automatically: > > PGHOST=example.com > PGPASSWORD=mypass > PGUSER=replikaator > export PGHOST PGPASSWORD PGUSER > /etc/init.d/postgresql stop > mv /var/lib/postgresql/12/main /var/

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

2020-06-01 Thread Peter Eisentraut
On 2020-05-31 06:33, Igor Polishchuk wrote: 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? In principle yes, since the compatibility is controlled

Re: pg_stat_sql_plans ALPHA released

2020-06-01 Thread legrand legrand
A new version of pg_stat_sql_plans (version 0.2) has been released. Main changes are: - planid is build at planning time, making it reusable by cached plans, - expose current queryid, planid per pid in pg_stat_activity, - planning counters are now calculated per (queryid,planid), - includes a spec

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

2020-06-01 Thread Andrus
Hi! I have tried to re-initiate replica serveral times in low-use time but this error occurs again. remove the whole replica's PGDATA/* and do a pg_basebackup again. But before that, make sure wal_keep_segments in big enough on the master and, I renamed whole cluster before pg_basebackup j

Re: problem with self built postgres 9.0.9

2020-06-01 Thread Gabriele Bulfon
I will consider the upgrade, thanks a lot! Gabriele     Sonicle S.r.l.  :  http://www.sonicle.com Music:  http://www.gabrielebulfon.com Quantum Mechanics :  http://www.cdbaby.com/cd/gabrielebulfon Da: David G. Johnston A: Gabriele Bulfon Cc: Adrian Klaver pgsql-generallists.postgresql.org Data: 29

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Thomas Kellerer
Stefan Knecht schrieb am 01.06.2020 um 07:36: Oracle is also the single most feature-rich database out there - the feature set of Postgres isn't even 1% of what Oracle has. I try to stay out of discussions like this, but the above is simply not true. Oracle indeed has more features but 1% is b

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Paul Förster
Hi Stefan, > On 01. Jun, 2020, at 07:36, Stefan Knecht wrote: > > 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. yes, and no. You are right about Oracle having gazillions of features

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Jayadevan M
On Sat, May 30, 2020 at 5:51 PM Paul Förster wrote: > Hi, > > I know, this list is not for this, but I just couldn't resist. Please > forgive me. > > Being an Oracle DBA for two decades now (back then starting with Oracle > 8.0.5) and only doing PostgreSQL since version 10.3, I feel compelled to

Re: pg_ctl can't start db server

2020-06-01 Thread Paul Förster
Hi Tanja, > On 01. Jun, 2020, at 09:04, Tanja Savic export > PGDATA=" /var/lib/postgresql/12/main" my wild guess is that the blank should not be there. Cheers, Paul

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Paul Förster
Hi Stefan, > On 01. Jun, 2020, at 00:35, Stefan Keller wrote: > 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 ca

RE: pg_ctl can't start db server

2020-06-01 Thread Tanja Savic
Hi, @Tom Adding -D in command worked. I just used pg_ctl start -D [data-directory ] PGDATA was not set permanently although I tried to set it (with postgres user): export PGDATA=" /var/lib/postgresql/12/main" @Adrian It's Ubuntu and output of pg_lsclusters was this: 12 main24538 online pos