Re: Same query taking less time in low configuration machine

2020-07-15 Thread David Rowley
On Thu, 16 Jul 2020 at 09:50, Thomas Munro wrote: > I'd look at EXPLAIN (BUFFERS) or auto_explain.log_buffers to get more > information on cache hits and misses. I'd look for settings > differences with EXPLAIN (SETTINGS) to see if there's anything > accidentally set differently (maybe JIT or par

Re: Same query taking less time in low configuration machine

2020-07-15 Thread Thomas Munro
On Tue, Jul 14, 2020 at 9:27 PM Vishwa Kalyankar wrote: > Function Scan on kseb_geometry_trace_with_barrier_partition > (cost=0.25..10.25 rows=1000 width=169) (actual time=11626.548..11626.568 > rows=254 loops=1) > Function Scan on kseb_geometry_trace_with_barrier_partition > (cost=0.25..1

Re: ownership of "/var/run/postgresql"

2020-07-15 Thread Christoph Moench-Tegeder
## Dmitry O Litvintsev (litvi...@fnal.gov): > Upgraded to 11 and now we see that file > > /var/run/postgresql changes ownership to postgres:postgres on reboot , > even though postgresql-11.service is disabled. That's /usr/lib/tmpfiles.d/postgresql.conf (or similar). Don't edit that file, see "

ownership of "/var/run/postgresql"

2020-07-15 Thread Dmitry O Litvintsev
Hi, we run 9.6 postgresql DB on Linux box. We run as different user than postgres. To get it to work we had to chown /var/run/postgresql to be owned by the process user. Upgraded to 11 and now we see that file /var/run/postgresql changes ownership to postgres:postgres on reboot , even thou

Re: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"

2020-07-15 Thread Karsten Hilbert
On Wed, Jul 15, 2020 at 10:03:06PM +0530, Naresh Kumar wrote: > Already I tried to connect with template0, template1, user database name, > postgres, nothing is working getting same error message as mentioned in > trail mail. > > For the second one, yes we don't have backups to restore, we don't h

Re: Issue executing query from container

2020-07-15 Thread Eudald Valcàrcel Lacasa
Hello Tom, I've noticed something that may be a factor on this problem. In the automated script, 5 or 6 seconds before this query happens, the foreign table is created. If I create the foreign table manually and skip its creation in the automated script, and then I run the automated script, the qu

Re: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"

2020-07-15 Thread Naresh Kumar
Thanks Denial, Already I tried to connect with template0, template1, user database name, postgres, nothing is working getting same error message as mentioned in trail mail. For the second one, yes we don't have backups to restore, we don't have any option apart from data directory(no wal files)

Re: 2 million queries against a table

2020-07-15 Thread Rob Sargent
On 7/15/20 9:38 AM, Tom Lane wrote: Adam Sanchez writes: I need to run 2 million queries against a three columns table t (s,p,o) which size is 10 billions rows. The data type of each column is string. The server has 512G RAM, 32 cores and 14T SSD (RAID 0) Only two types of queries: se

Re: Clustering solution ?

2020-07-15 Thread Laurent FAILLIE
Hello all, thanks all for your replies : I started to learn Patroni.Anyway, any alternative with my customer want's also LoadBalancing ? Thanks Laurent Le jeudi 9 juillet 2020 à 17:47:23 UTC+2, Laurent FAILLIE a écrit : Mainly for HA and DR but it can help also for the future if a lo

Re: 2 million queries against a table

2020-07-15 Thread Tom Lane
Adam Sanchez writes: > I need to run 2 million queries against a three columns table t > (s,p,o) which size is 10 billions rows. The data type of each column > is string. The server has 512G RAM, 32 cores and 14T SSD (RAID 0) > Only two types of queries: > select s p o from t where s = param >

Re: 2 million queries against a table

2020-07-15 Thread Ron
On 7/15/20 10:10 AM, Adam Sanchez wrote: Hi I need to run 2 million queries against a three columns table t (s,p,o) which size is 10 billions rows. The data type of each column is string. The server has 512G RAM, 32 cores and 14T SSD (RAID 0) Only two types of queries: select s p o from t whe

2 million queries against a table

2020-07-15 Thread Adam Sanchez
Hi I need to run 2 million queries against a three columns table t (s,p,o) which size is 10 billions rows. The data type of each column is string. The server has 512G RAM, 32 cores and 14T SSD (RAID 0) Only two types of queries: select s p o from t where s = param select s p o from t where o =

Re: single table - fighting a seq scan

2020-07-15 Thread Tom Lane
Radoslav Nedyalkov writes: > Shame on me. It's a partial index - *where is not null.* > Put the* is not null *predicate in place and planner always goes for index. > (tested with thousands of IN entries) > CTE version always goes for index too even *without **is not null , *which > led to a slight

Re: Issue executing query from container

2020-07-15 Thread Tom Lane
=?UTF-8?Q?Eudald_Valc=C3=A0rcel_Lacasa?= writes: > After running the query both manually and with the script, I've the > following logs: > MANUALLY: > Update on import_temp_2 tmp (cost=116.73..17352.10 rows=5557 width=293) > -> Hash Join (cost=116.73..17352.10 rows=5557 width=293) >

Re: Cross-site cookies warnings

2020-07-15 Thread Adrian Klaver
On 7/15/20 2:34 AM, Fabio wrote: I'm using python 3.7.4, django 3.0.6, javascript, Postgres 12.3.1 pgadmin 4.21 windows7. When my page loads on the console there are these warnings: |Cookie“PGADMIN_KEY”will be soon treated ascross-site cookie against “http://127.0.0.1:8000/lists/list-name/” b

Re: single table - fighting a seq scan

2020-07-15 Thread Radoslav Nedyalkov
Shame on me. It's a partial index - *where is not null.* Put the* is not null *predicate in place and planner always goes for index. (tested with thousands of IN entries) CTE version always goes for index too even *without **is not null , *which led to a slight confusion. Thanks Tom, Michael, Best

RE: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"

2020-07-15 Thread Daniel Verite
TALLURI Nareshkumar wrote: > [0]postgres@axmdevhkdb008$ [PHKGAXMD008] psql > psql: FATAL: database "postgres" does not exist That's not necessarily a problem. The "postgres" database is generally empty and some installations don't even have one. Use "psql -d template1" instead, or s

Cross-site cookies warnings

2020-07-15 Thread Fabio
I'm using python 3.7.4, django 3.0.6, javascript, Postgres 12.3.1 pgadmin 4.21 windows7. When my page loads on the console there are these warnings: |Cookie“PGADMIN_KEY”will be soon treated ascross-site cookie against “http://127.0.0.1:8000/lists/list-name/” because the scheme does not match.

How to enable TDE on Postgresql 12.3 deployed using Kubernetes

2020-07-15 Thread Samarendra Sahoo
If there are any references or you have done, could you pls share steps? Thanks

Re: some random() clarification needed

2020-07-15 Thread Marc Millas
Thanks! makes it clearer :-) its not that obvious to guess the consequences of the "volatile" behaviour. regards, Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Wed, Jul 15, 2020 at 1:53 AM David Rowley wrote: > On Wed, 15 Jul 2020 at 04:01, Marc Millas wrote: > > your answer h

Re: Issue executing query from container

2020-07-15 Thread Eudald Valcàrcel Lacasa
Hello Tom, Thanks for your answer! I didn't know about this plugin and configured postgresql with it. After running the query both manually and with the script, I've the following logs: MANUALLY: 2020-07-15 00:56:08.735 CEST [20457] cefron@kontriki LOG: statement: UPDATE import_temp_2 AS tmp SET

Re: Same query taking less time in low configuration machine

2020-07-15 Thread Vishwa Kalyankar
Hi, I am pasting the output of both server cpu speed and memory speed, and we have same os (centos) on both the machines and i have downloaded the postgres rpms from https://www.postgresql.org/ 1) High end machine [root@localhost ~]# dmidecode -t processor | grep Speed Max Speed: 360

RE: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"

2020-07-15 Thread TALLURI Nareshkumar
Hello Team, Can some one help us on this please , Actually we are blocked . Regards, Narresh From: TALLURI Nareshkumar SgscGtsPasDre Sent: Tuesday, July 14, 2020 5:20 PM To: pgsql-general@lists.postgresql.org Subject: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate ke