Re: Highly academic: local etcd & Patroni Cluster for testing on a single host

2020-02-25 Thread Paul Förster
Hi Ian, > On 26. Feb, 2020, at 01:38, Ian Barwick wrote: > > Assuming the standby/replica is created using pg_basebackup, you can use the > -T/--tablespace-mapping option to remap the tablespace directories. no, with Patroni, replicas are always initiated by Patroni. Patroni copies the whole P

Re: Backup & Restore

2020-02-25 Thread Thomas Kellerer
sivapostg...@yahoo.com schrieb am 25.02.2020 um 02:55: > Can u suggest a good backup solution for a windows installation ? > Looks like the suggested two [ pgbarman, pgbackrest ] works only in > Linux. pg_probackup provides Windows binaries: https://github.com/postgrespro/pg_probackup/

Re: Backup & Restore

2020-02-25 Thread sivapostg...@yahoo.com
We do have plans to move to Linux in the future after the successful implementation of at least 4 or 5 projects.  Till then we want to keep windows. We were (are) using SQL Server (also) and this is our first one with Postgres.   With our manpower, we feel tough to switch two things (Database &

Re: Backup & Restore

2020-02-25 Thread Adrian Ho
On 24/2/20 4:18 pm, Dor Ben Dov wrote: > > Hi All, > >   > > What is your backup and restore solution in production when working > with Postgres ? > > (+ if you can say few words why you picked this X solution instead of > others) > This is the THIRD time you've asked the same question with minimal

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Pavel Stehule
út 25. 2. 2020 v 22:14 odesílatel Tom Lane napsal: > Paul Jungwirth writes: > > Not that this is necessarily fatal, but you'd need to avoid parsing > > trouble with the other EXCEPT, e.g. > > SELECT 1 EXCEPT SELECT 1; > > Yeah, it doesn't sound like much consideration has been given to > that am

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Thomas Munro
On Wed, Feb 26, 2020 at 7:37 AM Adrian Klaver wrote: > On 2/25/20 10:23 AM, Mani Sankar wrote: > > Hi Adrian, > > > > Both the machines are in same network and both are pointing towards the > > same LDAP server > > I don't see any errors in the Postgres logs. > > You probably should take a look at

Re: Highly academic: local etcd & Patroni Cluster for testing on a single host

2020-02-25 Thread Ian Barwick
On 2020/02/26 0:41, Paul Förster wrote: Hi, I have set up an etcd & Patroni cluster on a single machine for testing purposes as follows: /data/pg01a/db as data directory for the first "node" /data/pg01b/db as data directory for the second "node" I have set up Patroni to make each PostgreSQL d

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Rob Sargent
> On Feb 25, 2020, at 2:14 PM, Tom Lane wrote: > > Paul Jungwirth writes: >> Not that this is necessarily fatal, but you'd need to avoid parsing >> trouble with the other EXCEPT, e.g. >> SELECT 1 EXCEPT SELECT 1; > > Yeah, it doesn't sound like much consideration has been given to > that

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Tom Lane
Paul Jungwirth writes: > Not that this is necessarily fatal, but you'd need to avoid parsing > trouble with the other EXCEPT, e.g. > SELECT 1 EXCEPT SELECT 1; Yeah, it doesn't sound like much consideration has been given to that ambiguity, but it's a big problem if you want to use a syntax like

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Paul Jungwirth
On 2/25/20 11:46 AM, Stanislav Motycka wrote: Dňa 25. 2. 2020 o 20:28 Paul A Jungwirth napísal(a): I take the proposal to mean this: SELECT listOfColumns [EXCEPT listOfColumns] FROM ... Exactly, simply exclude unneeded columns from the base clause "SELECT", nothing more .. Not that this is

Re: Connections dropping while using Postgres backend DB with Ejabberd

2020-02-25 Thread Dipanjan Ganguly
Hi Justin, I have already checked running Postgres processes and strangely never counted more than 20. I'll check as you recommend on how ejabberd to postgresql connectivity works. May be the answer lies there. Will get back if I find something. Thanks for giving some direction to my thoughts.

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Alvaro Herrera
On 2020-Feb-25, Stanislav Motyčka wrote: > Sometimes (for tables with many columns) it would be better and easier > to write "SELECT" statement with clause "EXCEPT": > "SELECT * [EXCEPT col1 [,col2]] FROM ..." I think an important initial question is how do other database systems implement this f

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Stanislav Motycka
Dňa 25. 2. 2020 o 20:28 Paul A Jungwirth napísal(a): I take the proposal to mean this: SELECT listOfColumns [EXCEPT listOfColumns] FROM ... Exactly, simply exclude unneeded columns from the base clause "SELECT", nothing more ..

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Guyren Howe
> On Feb 25, 2020, at 11:28 , Paul A Jungwirth > wrote: > > On Tue, Feb 25, 2020 at 2:18 AM Stanislav Motyčka > mailto:stanislav.moty...@gmail.com>> wrote: >> Sometimes (for tables with many columns) it would be better and easier to >> write "SELECT" statement with clause "EXCEPT": >> "SELECT

Re: Connections dropping while using Postgres backend DB with Ejabberd

2020-02-25 Thread Justin
Hi Dipanjan If the connections are not being closed and left open , you should see 50,000 processes running on the server because postgresql creates/forks a new process for each connection Just having that many processes running will exhaust resources, I would confirm that the process are stil

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Paul A Jungwirth
On Tue, Feb 25, 2020 at 2:18 AM Stanislav Motyčka wrote: > Sometimes (for tables with many columns) it would be better and easier to > write "SELECT" statement with clause "EXCEPT": > "SELECT * [EXCEPT col1 [,col2]] FROM ..." I've wanted this feature lots of times and would be delighted to see i

Re: Connections dropping while using Postgres backend DB with Ejabberd

2020-02-25 Thread Dipanjan Ganguly
Thanks Michael for the recommendation and clarification. Will try the with 32 MB on my next run. BR, Dipanjan On Tue, Feb 25, 2020 at 10:51 PM Michael Lewis wrote: > work_mem can be used many times per connection given it is per sort, hash, > or other operations and as mentioned that can be mu

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Adrian Klaver
On 2/25/20 10:23 AM, Mani Sankar wrote: Hi Adrian, Both the machines are in same network and both are pointing towards the same LDAP server I don't see any errors in the Postgres logs. You probably should take a look at the LDAP server logs to see if there is anything there. You could als

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Mani Sankar
Hi Adrian, Both the machines are in same network and both are pointing towards the same LDAP server Regards, Mani. On Tue, 25 Feb, 2020, 11:48 pm Adrian Klaver, wrote: > On 2/25/20 10:08 AM, Mani Sankar wrote: > > Hi Adrian, > > > > Should I want to try this configuration? > > I thought you wh

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Adrian Klaver
On 2/25/20 10:08 AM, Mani Sankar wrote: Hi Adrian, Should I want to try this configuration? I thought you where already using this configuration? Are the 9.4 and 11.5 instances are on the same machine and/or network? In other words is ldapserver=XXX pointing at the same thing?

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Mani Sankar
Hi Adrian, Should I want to try this configuration? Regards, Mani. On Tue, 25 Feb, 2020, 9:24 pm Adrian Klaver, wrote: > On 2/24/20 9:07 PM, Mani Sankar wrote: > Please reply to list also. > Ccing list. > > Hi Adrian, > > > > Thanks for replying. Below are the requested details. > > > > ##

Re: Connections dropping while using Postgres backend DB with Ejabberd

2020-02-25 Thread Michael Lewis
work_mem can be used many times per connection given it is per sort, hash, or other operations and as mentioned that can be multiplied if the query is handled with parallel workers. I am guessing the server has 16GB memory total given shared_buffers and effective_cache_size, and a more reasonable w

Re: Trigger

2020-02-25 Thread Adrian Klaver
On 2/25/20 9:08 AM, Alban Hertroys wrote: On 25 Feb 2020, at 17:53, Adrian Klaver wrote: On 2/25/20 12:01 AM, Sonam Sharma wrote: I have a trigger, like many other triggers that fire after update and checks a field of the OLD set. For some reason this trigger throw this error: ERROR: record

Re: Trigger

2020-02-25 Thread Alban Hertroys
> On 25 Feb 2020, at 17:53, Adrian Klaver wrote: > > On 2/25/20 12:01 AM, Sonam Sharma wrote: >> I have a trigger, like many other triggers that fire after >> update and checks a field of the OLD set. For some reason this trigger throw >> this error: >> ERROR: record "old" has no field "ivo_st

Re: Connections dropping while using Postgres backend DB with Ejabberd

2020-02-25 Thread Justin
Hi Dipanjan Please do not post to all the postgresql mailing list lets keep this on one list at a time, Keep this on general list Am i reading this correctly 10,000 to 50,000 open connections. Postgresql really is not meant to serve that many open connections. Due to design of Postgresql each c

Re: Trigger

2020-02-25 Thread Adrian Klaver
On 2/25/20 12:01 AM, Sonam Sharma wrote: I have a trigger, like many other triggers that fire after update and checks a field of the OLD set. For some reason this trigger throw this error: ERROR: record "old" has no field "ivo_sts_cd" CONTEXT: SQL statement if exc_count = 0 then UPDATE pp

Connections dropping while using Postgres backend DB with Ejabberd

2020-02-25 Thread Dipanjan Ganguly
Greetings, I was trying to use postgresql database as a backend with Ejabberd XMPP server for load test (Using TSUNG). Noticed, while using Mnesia the “simultaneous users and open TCP/UDP connections” graph in Tsung report is showing consistency, but while using Postgres, we see drop in connect

Re: Trigger

2020-02-25 Thread Adrian Klaver
On 2/25/20 12:01 AM, Sonam Sharma wrote: I have a trigger, like many other triggers that fire after update and checks a field of the OLD set. For some reason this trigger throw this error: ERROR: record "old" has no field "ivo_sts_cd" CONTEXT: SQL statement "UPDATE dbo.T8071_CAI_IVO_HDR SET

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Adrian Klaver
On 2/24/20 9:07 PM, Mani Sankar wrote: Please reply to list also. Ccing list. Hi Adrian, Thanks for replying. Below are the requested details. Configuration in 9.4 PG Version local all all ldap ldapserver=XX ldapport=3268 ldapprefix="ADS\" ldapsuffix="" ldaptls=1

Highly academic: local etcd & Patroni Cluster for testing on a single host

2020-02-25 Thread Paul Förster
Hi, I have set up an etcd & Patroni cluster on a single machine for testing purposes as follows: /data/pg01a/db as data directory for the first "node" /data/pg01b/db as data directory for the second "node" I have set up Patroni to make each PostgreSQL database cluster archive to its own destin

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Miles Elam
On Tue, Feb 25, 2020 at 6:41 AM Josef Šimánek wrote: > > út 25. 2. 2020 v 15:35 odesílatel Miles Elam > napsal: > >> How do you see this syntax working in a JOIN query? >> >> SELECT x.* EXCEPT x.col1, x.col2, y.col1 >> FROM tablex AS x >> LEFT JOIN tabley AS y; >> >> The column(s) you want to

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Josef Šimánek
út 25. 2. 2020 v 15:35 odesílatel Miles Elam napsal: > How do you see this syntax working in a JOIN query? > > SELECT x.* EXCEPT x.col1, x.col2, y.col1 > FROM tablex AS x > LEFT JOIN tabley AS y; > > The column(s) you want to exclude become ambiguous. > Can you explain how are those column(s)

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Laurenz Albe
On Tue, 2020-02-25 at 11:58 +, Mihalidesová Jana wrote: > Is there possibility to upgrade from 10.6 to 12.2 using exact same data > directory? > First problem is with initialing of “new” cluster. Then pg_upgrade check fail. > > ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c No,

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Miles Elam
How do you see this syntax working in a JOIN query? SELECT x.* EXCEPT x.col1, x.col2, y.col1 FROM tablex AS x LEFT JOIN tabley AS y; The column(s) you want to exclude become ambiguous. Parentheses? SELECT x.* EXCEPT (x.col1, x.col2), y.col1 FROM tablex AS x LEFT JOIN tabley AS y; Could work

Re: Backup & Restore

2020-02-25 Thread Stephen Frost
Greetings, * sivapostg...@yahoo.com (sivapostg...@yahoo.com) wrote: > HiCan u suggest a good backup solution for a windows installation ?  Looks > like the suggested two [ pgbarman, pgbackrest ] works only in Linux. While it's certainly something we'd like to do, we haven't ported pgbackrest to

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Paul Förster
Hi J, you can do the following: mkdir /alias/data/dbname-new initdb -D /alias/data/dbname-new pg_upgrade \ -b /old/bin/dir \ -B /new/bin/dir \ -d /alias/data/dbname \ -D /alias/data/dbname-new \ -k After the successful upgrade: rm -rf /alias/data/dbname mv /alias/data/dbname

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Sushant Pawar
Yes, Initdb will not work if there are existing cluster data files. You will have to initialize the Postgres 12 cluster to a new data directory path and later you can use either pg_upgrade normal command or along with an in-place upgrade option. Just a note, make sure you have a valid backup of t

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Ray O'Donnell
On 25/02/2020 12:52, Mihalidesová Jana wrote: > I think it’s strange to change the data directory $PATH every time I > upgrade the software, when the data are the same. I have a specific > naming convention not using a db version. There's a lot to recommend keeping an untouched copy of your old da

RE: Upgrade to 12.2 using same data directory

2020-02-25 Thread Mihalidesová Jana
Yes, that’s what I though, but the pre-upgrade check will be done with downtime. Ok, Thanks. J From: Josef Šimánek Sent: Tuesday, February 25, 2020 1:54 PM To: Mihalidesová Jana Cc: pgsql-general@lists.postgresql.org Subject: Re: Upgrade to 12.2 using same data directory I think it should b

RE: Upgrade to 12.2 using same data directory

2020-02-25 Thread Mihalidesová Jana
Hi, The -k option doesn’t work. First is the problem to initialize new cluster to the same directory. initdb: directory "$PATH" exists but is not empty If you want to create a new database system, either remove or empty the directory "$PATH" or run initdb with an argument other than "$PATH".

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Josef Šimánek
I think it should be possible to rename old cluster data dir (you can use some suffix) and reuse your current directory name for upgraded cluster. something similar to (not tested): mv /alias/data/ /alias/data/.old ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d /alias/data/.old -D /alias/data/ -k -c út

RE: Upgrade to 12.2 using same data directory

2020-02-25 Thread Mihalidesová Jana
I think it’s strange to change the data directory $PATH every time I upgrade the software, when the data are the same. I have a specific naming convention not using a db version. /alias/data/ J From: Josef Šimánek Sent: Tuesday, February 25, 2020 1:05 PM To: Mihalidesová Jana Cc: pgsql-gener

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Sushant Pawar
Hi Mihalidesová, It should work with -k option. Can you share the error that you have received? You can execute pg_upgrade with -c option to identify any possible manual change required. Best Regards, *Sushant Pawar | Database Solution Consultant* *ASHNIK TECHNOLOGY SOLUTIONS PVT. LTD.* Skype

Re: Upgrade to 12.2 using same data directory

2020-02-25 Thread Josef Šimánek
I think that's not possible. What's the reason to reuse old directory? út 25. 2. 2020 v 12:59 odesílatel Mihalidesová Jana < jana.mihalides...@cetin.cz> napsal: > Hi, > > > > Is there possibility to upgrade from 10.6 to 12.2 using exact same data > directory? First problem is with initialing of “

Upgrade to 12.2 using same data directory

2020-02-25 Thread Mihalidesová Jana
Hi, Is there possibility to upgrade from 10.6 to 12.2 using exact same data directory? First problem is with initialing of "new" cluster. Then pg_upgrade check fail. ./pg_upgrade -b $OLD/bin -B $NEWd/bin -d $OLD -D $OLD -k -c Thx, Jana Obsah této zprávy má výlučně komunikační charakter. Ne

Re: aws sct/dms versus ora2pg

2020-02-25 Thread Gilles Darold
Le 22/02/2020 à 02:07, Ayub M a écrit : > I would like to get suggestions and feedback on aws sct/dms vs ora2pg > for an Oracle (on-prem) to PostgreSQL (aws rds) migration project. > > One big difference between them I see is the fact that dms supports > incremental loads from oracle to postgres (d

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Fabio Ugo Venchiarutti
That makes sense, however for my general use case I'd also like the ability to mark some columns as not match-able by `SELECT * FROM ` and `TABLE ` at table definition without having to create dedicated views (think of the way system attributes such as tableoid, cmax, cmin ... are handled) .

Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Josef Šimánek
Just to mention, similar concept can be found in Google BigQuery. https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select-except https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select-replace út 25. 2. 2020 v 11:18 odesílatel Stanislav Motyčka

a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

2020-02-25 Thread Stanislav Motyčka
Hello, Sometimes (for tables with many columns) it would be better and easier to write "SELECT" statement with clause "EXCEPT": "SELECT * [EXCEPT col1 [,col2]] FROM ..." It's easier to write "except" one or two columns from all (*) as to write names of all columns besides one or two. What do you

Re: Replication: slave server has 3x size of production server?

2020-02-25 Thread Jehan-Guillaume de Rorthais
On Sat, 22 Feb 2020 19:23:05 + Edson Richter wrote: [...] > Actually, standby server is sending wals to a backup (barman) server: > > archive_mode = always # enables archiving; off, on, or always > (change requires restart) archive_command = 'rsync -e "ssh -2 -C -p 2022" -az > %p ba

Re: Postgres 12.1 : UPPER() in WHERE clause restarts server

2020-02-25 Thread Nick Renders
Hi Tom, 1. we used the EDB installer. 2. turning JIT off did make the problem go away. So I guess this was causing the Postgres process to crash all along. Thanks for the help, Nick On 24 Feb 2020, at 16:24, Tom Lane wrote: "Nick Renders" writes: We have set up a new test environment ru

Re: LDAP with TLS is taking more time in Postgresql 11.5

2020-02-25 Thread Laurenz Albe
On Tue, 2020-02-25 at 01:20 +0530, Mani Sankar wrote: > We have recently upgraded our postgres servers from 9.4 version to 11.5 > version. Post upgrade we are see delay in authentication. > > Issue is when we are using ldaptls=1 the authentication takes 1 second or > greater than that. But if I

Trigger

2020-02-25 Thread Sonam Sharma
I have a trigger, like many other triggers that fire after update and checks a field of the OLD set. For some reason this trigger throw this error: ERROR: record "old" has no field "ivo_sts_cd" CONTEXT: SQL statement "UPDATE dbo.T8071_CAI_IVO_HDR SET IVO_STS_CD = 1 where T616_VBU_NBR=old.T616_