Re: How is PG replication typically used to create a High Availability (HA) config ?

2020-08-12 Thread Paul Förster
Hi David, please don't top-post. > On 11. Aug, 2020, at 22:57, David Gauthier wrote: > > Thanks for the response Paul :-) > > Our code is actually perl which uses DBI which has functions to ping a DB on > a specific server and connect to it. > But my question was more along the lines of

Postgres automatic minor version upgrade

2020-08-12 Thread Shantanu Shekhar
Hello, We are using Postgres 11.6 through AWS relational database service. As part of its RDS service AWS offers automatic minor version upgrade. If we turn this setting on the minor versions will get upgraded without us even knowing about it. We are in a security sensitive vertical so we would

Re: pglogical 2.3.2 on 9.4 --> 12.3 CONFLICT: remote DELETE (tuple not found). Resolution: skip.

2020-08-12 Thread milist ujang
replication identity correctly displayed on detail after resolution message: LOG: CONFLICT: remote DELETE on relation public.a_ replica identity index a_XXX_pk (tuple not found). Resolution: skip. DETAIL: remote tuple {created_by[int8]:(null) created_date[timestamp]:(null)

insert on conflict postgres returning distinction

2020-08-12 Thread pinker
is there any way to distinct between updated and inserted rows in RETURNING clause when ON CONFLICT UPDATE was used? -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Postgres automatic minor version upgrade

2020-08-12 Thread Adrian Klaver
On 8/12/20 5:46 AM, Shantanu Shekhar wrote: Hello, We are using Postgres 11.6 through AWS relational database service. As part of its RDS service AWS offers automatic minor version upgrade. If we turn this setting on the minor versions will get upgraded without us even knowing about it. We

Re: insert on conflict postgres returning distinction

2020-08-12 Thread Adrian Klaver
On 8/12/20 7:23 AM, pinker wrote: is there any way to distinct between updated and inserted rows in RETURNING clause when ON CONFLICT UPDATE was used? Do you want to use that information immediately in the query or store it somewhere? If the first case I don't think that is possible. For the

Re: insert on conflict postgres returning distinction

2020-08-12 Thread pinker
thank you Adrian, the background of it is that I have already written the python script that translates Oracle MERGE clause to Postgres INSERT ... ON CONFLICT, but in order to be able to add DELETE part from MERGE i need to distinct those operations. thank you for the idea with trigger, i

Re: Implement a new data type

2020-08-12 Thread Philip Semanchuk
> On Aug 11, 2020, at 8:01 PM, raf wrote: > > On Tue, Aug 11, 2020 at 06:38:39AM -0700, Miles Elam > wrote: > >> Also of note: PostgreSQL already has a money type ( >> https://www.postgresql.org/docs/current/datatype-money.html) >> But you shouldn't use it ( >>

Re: Sizing PostgreSQL VM server sizing

2020-08-12 Thread Michael Lewis
On Tue, Aug 11, 2020 at 10:19 AM Samarendra Sahoo < sahoo.samaren...@gmail.com> wrote: > Dear all, > We are getting ready to install in production and would like to know what > are key considerations and how do we use them to provision VMs for the same? > It is going to be highly dependent on

Re: How is PG replication typically used to create a High Availability (HA) config ?

2020-08-12 Thread David Gauthier
Thanks again Paul and Rob. I'm going to need more specifics from my IT department regarding exactly what they did... what tool they used to create what they are calling this "High Availability" DB (pg-bouncer, etc...). If I can determine that, then maybe there are already some hooks in place that

Re: hash joins are causing no space left error

2020-08-12 Thread Tom Lane
Ayub M writes: > This is PostgreSQL 11 on AWS, there is a mview query in this OLAP database, > the tables involved are huge - 50-100m records on average records hundreds > of columns in most cases. The query runs for a while and then errors out > saying "No space left on device". I could see it

Re: insert on conflict postgres returning distinction

2020-08-12 Thread pinker
how about this solution? Does it have any caveats? WITH upsert AS (INSERT INTO GUCIO (ID, NAZWA) SELECT A.ID, A.NAZWA FROM ALA A ON CONFLICT (ID) DO UPDATE SET nazwa = excluded.nazwa RETURNING xmax,xmin, *) select xmax as xmax_value into txmaxu from upsert; delete from

hash joins are causing no space left error

2020-08-12 Thread Ayub M
This is PostgreSQL 11 on AWS, there is a mview query in this OLAP database, the tables involved are huge - 50-100m records on average records hundreds of columns in most cases. The query runs for a while and then errors out saying "No space left on device". I could see it generating around 500gb

Re: insert on conflict postgres returning distinction

2020-08-12 Thread pinker
Od course inside transaction block -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Server goes to Recovery Mode when run a SQL

2020-08-12 Thread Tom Lane
PegoraroF10 writes: > Hi Michael, so sorry for the delay. I did never had that problem again, so > tougth it was solved, but seems not. We have two different SQL which pushs > server to recovery mode. This SQL is the hardest one, because you´ll have to > wait some time to get the error. Just runs

psql and jdbc default sslmode

2020-08-12 Thread Shankar Bhaskaran
Hi , We are making connections to the postgres server through jdbc and psql (libpq) . I have set the ssl as on the postgres server . It can take ssl as well as non ssl connections. I made a connection through a psql client to postgres server and could confirm that the default sslmode (when no

Re: Server goes to Recovery Mode when run a SQL

2020-08-12 Thread PegoraroF10
Hi Michael, so sorry for the delay. I did never had that problem again, so tougth it was solved, but seems not. We have two different SQL which pushs server to recovery mode. This SQL is the hardest one, because you´ll have to wait some time to get the error. Just runs this SQL, opens your HTOP

Re: Implement a new data type

2020-08-12 Thread raf
On Wed, Aug 12, 2020 at 12:44:21PM -0400, Philip Semanchuk wrote: > > On Aug 11, 2020, at 8:01 PM, raf wrote: > > > > On Tue, Aug 11, 2020 at 06:38:39AM -0700, Miles Elam > > wrote: > > > >> Also of note: PostgreSQL already has a money type ( > >>