Re: [GENERAL] regexp_matches where clause - PG 9.1

2017-04-05 Thread Patrick B
2017-04-06 17:35 GMT+12:00 Arjen Nienhuis : > > > On Apr 6, 2017 05:57, "Patrick B" wrote: > > Hi guys, > > i've got this column: > > path_name character varying(255) >> > > I store full S3 bucket path for the attachments of my application on it; > example: > > /{s3bucket}/filesuser/client/278011

Re: [GENERAL] regexp_matches where clause - PG 9.1

2017-04-05 Thread Arjen Nienhuis
On Apr 6, 2017 05:57, "Patrick B" wrote: Hi guys, i've got this column: path_name character varying(255) > I store full S3 bucket path for the attachments of my application on it; example: /{s3bucket}/filesuser/client/27801123/attachment/4510/main > /{s3bucket}/filesuser/client/27801123/attac

Re: [GENERAL] A change in the Debian install

2017-04-05 Thread Adrian Klaver
On 04/05/2017 08:03 PM, rob stone wrote: Hello, Postgres is started via pg_ctl and NOT systemd. Below are the log entries when version 9.6.2-1 is started. 2017-04-04 07:15:27 AESTLOG: database system was shut down at 2017-04- 03 13:08:27 AEST 2017-04-04 07:15:28 AESTLOG: MultiXact member wra

Re: [GENERAL] A change in the Debian install

2017-04-05 Thread Tom Lane
rob stone writes: > Upgraded to version 9.6.2-2 and these are the log entries on start-up:- > 2017-04-05 08:03:29 AESTLOG:  test message did not get through on > socket for statistics collector This is not something that would be affected by any Postgres setting; the stats collector always depen

[GENERAL] regexp_matches where clause - PG 9.1

2017-04-05 Thread Patrick B
Hi guys, i've got this column: path_name character varying(255) > I store full S3 bucket path for the attachments of my application on it; example: /{s3bucket}/filesuser/client/27801123/attachment/4510/main > /{s3bucket}/filesuser/client/27801123/attachment/4510/file > I wanna do a select, wh

Re: [GENERAL] Unexpected interval comparison

2017-04-05 Thread Tom Lane
Kyotaro HORIGUCHI writes: > By the way the adt directory is, as suggested by the name, > storing files with names of SQL data types so "int128.c" among > then seems incongruous. Is "int128_test.c" acceptable? int16.c > will be placed there in case we support int16 or hugeint on SQL. After further

Re: [GENERAL] Unexpected interval comparison

2017-04-05 Thread Kyotaro HORIGUCHI
At Wed, 05 Apr 2017 15:51:10 -0400, Tom Lane wrote in <27982.1491421...@sss.pgh.pa.us> > Hmm, this still isn't right --- testing shows that you had the comparison > rule right the first time. Perhaps Laplaces's deamon is continuously nudging on my head toward wrong conclusion, sigh. Sorry for bo

[GENERAL] A change in the Debian install

2017-04-05 Thread rob stone
Hello, Postgres is started via pg_ctl and NOT systemd. Below are the log entries when version 9.6.2-1 is started. 2017-04-04 07:15:27 AESTLOG:  database system was shut down at 2017-04- 03 13:08:27 AEST 2017-04-04 07:15:28 AESTLOG:  MultiXact member wraparound protections are now enabled 2017-04-

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread George Neuner
On Wed, 5 Apr 2017 14:44:55 -0700, "David G. Johnston" wrote: >A mailing list configuration that will automatically add on the OP to any >email in a message thread lacking the OP would work-around those list >respondents who would use "Reply" instead of "Reply All". Keeping track of >all respond

[GENERAL] Re: Is this pgbouncer configuration suitable for a production environment with hundreds of databases?

2017-04-05 Thread Lisandro
Thank you very much David for your quick reply, I understand better now. For now, I'll let default_pool_size=2 and I guess I will have to monitor the total number of databases and adjust configuration when needed, in order to avoid reaching the postgres max_connection limit. I think I can play a

Re: [GENERAL] Is this pgbouncer configuration suitable for a production environment with hundreds of databases?

2017-04-05 Thread David G. Johnston
On Wed, Apr 5, 2017 at 3:29 PM, Lisandro wrote: > > The question is: can I set default_pool_size=0 ​ISTM parameter would be better named (i.e., mentally remembered as) "default_maximum_pool_size" ... and a zero for that seems like you'll render your system inoperable since: "Notice that I don'

[GENERAL] Is this pgbouncer configuration suitable for a production environment with hundreds of databases?

2017-04-05 Thread Lisandro
Hi there! I'm using pgbouncer in front of a PostgreSQL 9.3 instance. I have hundreds of databases (almost 200 and counting). The clients connect to pgbouncer always with the same user (there is one only user). Currently I have *postgresql max_connections=200*. My pgbouncer configuration is this (

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread David G. Johnston
On Wed, Apr 5, 2017 at 2:19 PM, George Neuner wrote: > > >So the question is, what is the problem we are trying to solve? > > How to support BOTH quick and dirty questions:answers AND complex > technical discussions that require significant time from their > participants. > > ​The problem of self

[GENERAL] Archiving data to another server using copy, psql with pipe

2017-04-05 Thread pinker
Hi, I'm trying to write an archive manager which will be first copying data from tables with where clause and then, after successful load into second server - delete them. The simplest (and probably fastest) solution I came up with is to use copy: psql -h localhost postgres -c "copy (SELECT * FROM

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread George Neuner
On Wed, 5 Apr 2017 10:57:23 -0700, "Joshua D. Drake" wrote: >Stack Overflow (as an example) is a collaboration platform. Stack >understands the problem and is very, very good at solving it. It is why >they are successful. Stack Overflow *is* successful ... at driving people away because any co

Re: [GENERAL] Unexpected interval comparison

2017-04-05 Thread Tom Lane
I wrote: > Looking at what we've got here, it's already a substantial fraction of > what would be needed to provide a compiler-independent implementation > of the int128-based aggregate logic in numeric.c. With that in mind, > I propose that we extract the relevant stuff into a new header file > t

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread George Neuner
On Wed, 5 Apr 2017 11:39:17 -0700, John R Pierce wrote: >On 4/5/2017 11:30 AM, George Neuner wrote: >> This makes it difficult to follow a discussion via email, and Google's >> list handling is flawed - it sometimes breaks the underlying list >> threading [while keeping its own GUI correct], and

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Tom Lane
Bruno Wolff III writes: > P.S. Using spgist with version 10 for the exclude index is much faster > than using gist in 9.6. I have run the index creation for as long as > 6 hours and it hasn't completed with 9.6. It took less than 10 minutes > to create it in 10. For this project using 10 isn't

Re: [GENERAL] Unexpected interval comparison

2017-04-05 Thread Tom Lane
Kyotaro HORIGUCHI writes: > The attached patch is the revised version. Hmm, this still isn't right --- testing shows that you had the comparison rule right the first time. Looking at what we've got here, it's already a substantial fraction of what would be needed to provide a compiler-independen

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Joshua D. Drake
On 04/05/2017 11:46 AM, Magnus Hagander wrote: On Wed, Apr 5, 2017 at 7:22 PM, Joshua D. Drake mailto:j...@commandprompt.com>> wrote: Stackoverflow gives back by providing an interface people want to use. It is free (as in beer) and is hugely popular. I think one of the greatest thi

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Magnus Hagander
On Wed, Apr 5, 2017 at 7:22 PM, Joshua D. Drake wrote: > On 03/24/2017 11:45 PM, Tom Lane wrote: > >> John R Pierce writes: >> >>> On 3/24/2017 9:49 PM, Yuri Budilov wrote: >>> >> > They are uniformly unfriendly when viewed from this end of the >> relationship. nabble for instance reposts stuff

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
Daniel Westermann writes: >> Thank you, Merlin. As said I know that "not in" is not a good choice in this >> case but I still do not get what is going here. Why does the >> repeatedly search for NULL values when I decrease work_mem and why not when >> increasing work_mem? >The core point is t

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread George Neuner
On Wed, 5 Apr 2017 12:05:39 -0500, John McKown wrote: > : >I don't mind an "archive" web site which records all of the >emails. And it it properly threads them, that is even better. I have that >on a number of my lists. And you can even post through them. The post goes >directly to the web site,

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread John R Pierce
On 4/5/2017 11:30 AM, George Neuner wrote: This makes it difficult to follow a discussion via email, and Google's list handling is flawed - it sometimes breaks the underlying list threading [while keeping its own GUI correct], and broken threads can be hard to follow even with a decent news reade

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread George Neuner
On Wed, 5 Apr 2017 09:31:59 -0700, Adrian Klaver wrote: >On 04/05/2017 09:17 AM, Magnus Hagander wrote: > >> This has been tried a number of times. I'ts been a couple of years since >> I last saw one, but multiple people have set up forums, either mirrored >> or not. They have all died because of

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Bruno Wolff III
On Wed, Apr 05, 2017 at 12:11:09 -0600, Rob Sargent wrote: On 04/05/2017 12:04 PM, Bruno Wolff III wrote: On Wed, Apr 05, 2017 at 00:05:31 -0400, Tom Lane wrote: Bruno Wolff III writes: ... I create both a normal gist index and an exclude index using the following: CREATE INDEX contains

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Adrian Klaver
On 04/05/2017 10:57 AM, Joshua D. Drake wrote: On 04/05/2017 10:45 AM, Adrian Klaver wrote: On 04/05/2017 10:26 AM, Tim Clarke wrote: +1 Joshua, that's the best reason I've heard so far and it seems very powerful to me. The more readers we have and the easier they can communicate with us (doe

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Rob Sargent
On 04/05/2017 12:04 PM, Bruno Wolff III wrote: On Wed, Apr 05, 2017 at 00:05:31 -0400, Tom Lane wrote: Bruno Wolff III writes: ... I create both a normal gist index and an exclude index using the following: CREATE INDEX contains ON iplocation USING gist (network inet_ops); ALTER TABLE iplo

Re: [GENERAL] Is there a point to having both a normal gist index and an exclude index?

2017-04-05 Thread Bruno Wolff III
On Wed, Apr 05, 2017 at 00:05:31 -0400, Tom Lane wrote: Bruno Wolff III writes: ... I create both a normal gist index and an exclude index using the following: CREATE INDEX contains ON iplocation USING gist (network inet_ops); ALTER TABLE iplocation ADD CONSTRAINT overlap EXCLUDE USING gist

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Joshua D. Drake
On 04/05/2017 10:45 AM, Adrian Klaver wrote: On 04/05/2017 10:26 AM, Tim Clarke wrote: +1 Joshua, that's the best reason I've heard so far and it seems very powerful to me. The more readers we have and the easier they can communicate with us (doesn't matter if they are "wrong") then the bette

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Vincent Elschot
Op 05/04/2017 om 19:26 schreef Tim Clarke: On 05/04/17 18:22, Joshua D. Drake wrote: Stackoverflow gives back by providing an interface people want to use. It is free (as in beer) and is hugely popular. We need to be embracing these external communities because it is where our growth is. I ru

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Adrian Klaver
On 04/05/2017 10:26 AM, Tim Clarke wrote: On 05/04/17 18:22, Joshua D. Drake wrote: Stackoverflow gives back by providing an interface people want to use. It is free (as in beer) and is hugely popular. We need to be embracing these external communities because it is where our growth is. I run

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Joshua D. Drake
On 03/24/2017 09:49 PM, Yuri Budilov wrote: Hello everyone Can these forums be moved to internet ? All these emails is so 1990s. So hard to follow, so hard to search for historical answers. We really need to be able to post via browser. best regards to everyone You are going to find that the

Re: [GENERAL] Advise on primary key for detail tables (OS: Raspberry Pi)

2017-04-05 Thread George Neuner
On Wed, 5 Apr 2017 18:04:39 +0300, Ertan Küçüko?lu wrote: >I have a project which will be mainly built on Raspberry Pi and some parts >on Windows. > >I must have a PostgreSQL 9.4.10 running on Raspberry Pi and another >PostgreSQL running on Windows. Though, there is still a possibility that >Wind

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Tim Clarke
On 05/04/17 18:22, Joshua D. Drake wrote: > Stackoverflow gives back by providing an interface people want to use. > It is free (as in beer) and is hugely popular. > > We need to be embracing these external communities because it is where > our growth is. I run into people every single week that a

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Joshua D. Drake
On 03/24/2017 11:45 PM, Tom Lane wrote: John R Pierce writes: On 3/24/2017 9:49 PM, Yuri Budilov wrote: They are uniformly unfriendly when viewed from this end of the relationship. nabble for instance reposts stuff into the mailing lists that is missing critical portions. stackoverflow doe

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread John McKown
On Wed, Apr 5, 2017 at 11:51 AM, Steve Litt wrote: > ​ > > > In addition, once you subscribe to a mailing list, all info comes to > you. No password necessary. Read, reply, lightning quick. > > Contrast this with forums, where you have to remember to go out to each > and every forum you're intere

Re: [GENERAL] How does hot_standby_feedback work

2017-04-05 Thread Scott Marlowe
On Wed, Apr 5, 2017 at 3:37 AM, Александр Киселев wrote: > Hello! > > My name is Alexander. I am an administarator PostgreSQL. > I am studying PostgreSQL's 9.6 documentation. > I am interested in parameter hot_standby_feedback in postgresql.conf > Can you explain more detail than in documentation

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Steve Litt
On Wed, 5 Apr 2017 09:31:59 -0700 Adrian Klaver wrote: > On 04/05/2017 09:17 AM, Magnus Hagander wrote: > > > > > This has been tried a number of times. I'ts been a couple of years > > since I last saw one, but multiple people have set up forums, > > either mirrored or not. They have all died be

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Magnus Hagander
On Wed, Apr 5, 2017 at 6:31 PM, Adrian Klaver wrote: > On 04/05/2017 09:17 AM, Magnus Hagander wrote: > > >> This has been tried a number of times. I'ts been a couple of years since >> I last saw one, but multiple people have set up forums, either mirrored >> or not. They have all died because of

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Adrian Klaver
On 04/05/2017 09:17 AM, Magnus Hagander wrote: This has been tried a number of times. I'ts been a couple of years since I last saw one, but multiple people have set up forums, either mirrored or not. They have all died because of either lack of usage or because the person who did it disappeared

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Magnus Hagander
On Wed, Apr 5, 2017 at 4:14 PM, vinny wrote: > On 2017-04-05 15:11, Vincent Veyron wrote: > >> On Tue, 04 Apr 2017 12:01:24 +0200 >> vinny wrote: >> >>> >>> Every time I tell someone about the mailinglists I then have to explain >>> how they can subscribe, how to create folders, filters etc. And

Re: [GENERAL] Advise on primary key for detail tables (OS: Raspberry Pi)

2017-04-05 Thread Adrian Klaver
On 04/05/2017 08:04 AM, Ertan Küçükoğlu wrote: Hello, I have a project which will be mainly built on Raspberry Pi and some parts on Windows. I must have a PostgreSQL 9.4.10 running on Raspberry Pi and another PostgreSQL running on Windows. Though, there is still a possibility that Windows datab

Re: [GENERAL] expensive function in select list vs limit clause

2017-04-05 Thread Chris Mair
ORDER BY can only be processed after all rows have been fetched, this includes the expensive result column. You can easily avoid that by applying the LIMIT first: SELECT r, expensive() FROM (SELECT r FROM big ORDER BY r LIMIT 10 ) inner; I don't know how ha

Re: [GENERAL] expensive function in select list vs limit clause

2017-04-05 Thread Chris Mair
https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=9118d03a8 Hi, thanks! I've just tested with 9.6 and the test runs fast with or without expensive(). So the above patch does indeed improve this case a lot! Bye, Chris. -- Sent via pgsql-general mailing list (pgsql-gene

[GENERAL] Advise on primary key for detail tables (OS: Raspberry Pi)

2017-04-05 Thread Ertan Küçükoğlu
Hello, I have a project which will be mainly built on Raspberry Pi and some parts on Windows. I must have a PostgreSQL 9.4.10 running on Raspberry Pi and another PostgreSQL running on Windows. Though, there is still a possibility that Windows database server will be something else that is not kno

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Adrian Klaver
On 04/05/2017 07:14 AM, vinny wrote: On 2017-04-05 15:11, Vincent Veyron wrote: On Tue, 04 Apr 2017 12:01:24 +0200 vinny wrote: Every time I tell someone about the mailinglists I then have to explain how they can subscribe, how to create folders, filters etc. And more often than not they just

Re: [GENERAL] expensive function in select list vs limit clause

2017-04-05 Thread Tom Lane
Chris Mair writes: > From the timings it appears that in the second explain analyze query a > function > call in the select list (expensive()) is evaluated in the sequential scan node > *for each* row in big, despite the use of limit. According to the SQL standard, the SELECT list is evaluated

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread vinny
On 2017-04-05 15:11, Vincent Veyron wrote: On Tue, 04 Apr 2017 12:01:24 +0200 vinny wrote: Every time I tell someone about the mailinglists I then have to explain how they can subscribe, how to create folders, filters etc. And more often than not they just say forget it and go to some forum.

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Tom Lane
Daniel Westermann writes: > Thank you, Merlin. As said I know that "not in" is not a good choice in this > case but I still do not get what is going here. Why does the server > repeatedly search for NULL values when I decrease work_mem and why not when > increasing work_mem? The core point is

Re: [GENERAL] browser interface to forums please?

2017-04-05 Thread Vincent Veyron
On Tue, 04 Apr 2017 12:01:24 +0200 vinny wrote: > > Every time I tell someone about the mailinglists I then have to explain > how they can subscribe, how to create folders, filters etc. And more > often than not > they just say forget it and go to some forum. On forums, all you see is the heade

Re: [GENERAL] Keycloak and Postgres

2017-04-05 Thread Bill Moran
On Wed, 5 Apr 2017 07:24:32 + Marc Tempelmeier wrote: > > Can you elaborate a bit on this part: > " Because of how Postgres caches changes, you may find that a failover > requires some time in recovery mode." https://www.postgresql.org/docs/9.6/static/wal-intro.html The WAL requires that a

Re: [GENERAL] Unexpected interval comparison

2017-04-05 Thread Kyotaro HORIGUCHI
Mmm. It's shameful. At Tue, 04 Apr 2017 18:06:38 -0400, Tom Lane wrote in <5084.1491343...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > The first attached is the revised patch and the second is > > temporary sanity check code for non-128bit environment code. (but > > works only on 128 bit env

Re: [GENERAL] expensive function in select list vs limit clause

2017-04-05 Thread Albe Laurenz
Chris Mair wrote: > I've found a (simple) situation where the planner does something I don't > understand. > > Below is a complete test case followed by output. > > From the timings it appears that in the second explain analyze query a > function > call in the select list (expensive()) is eval

Re: [GENERAL] [ADMIN] calculating table and index size

2017-04-05 Thread Steven Chang
Hello, try pgstattuple() and pgstatindex() , I think you will figure it out. Steven 2017-04-05 16:56 GMT+08:00 Guillaume Lelarge : > Hi, > > 2017-04-05 9:44 GMT+02:00 Günce Kaya : > >> Hi all, >> >> I have some questions about calculating table and index size. >> >> I have a dummy table whi

[GENERAL] How does hot_standby_feedback work

2017-04-05 Thread Александр Киселев
Hello! My name is Alexander. I am an administarator PostgreSQL.I am studying PostgreSQL's 9.6 documentation.I am interested in parameter hot_standby_feedback in postgresql.confCan you explain more detail than in documentation for what this parameter is used?In what situations the parameter can show

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
2017-04-05 10:33 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : 2017-04-05 10:13 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : BQ_BEGIN 2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : BQ_BEGIN >>what is r

Re: [GENERAL] [ADMIN] calculating table and index size

2017-04-05 Thread Guillaume Lelarge
Hi, 2017-04-05 9:44 GMT+02:00 Günce Kaya : > Hi all, > > I have some questions about calculating table and index size. > > I have a dummy table which has an integer column and its index. The table > has 140 rows and all of rows are same thats value is 2000. Table > size is 50MB and index

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Pavel Stehule
2017-04-05 10:33 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com>: > 2017-04-05 10:13 GMT+02:00 Daniel Westermann services.com>: > >> 2017-04-05 9:28 GMT+02:00 Daniel Westermann > services.com>: >> >>> >>what is result of EXPLAIN statement for slow and fast cases? >>> >> >>> >>re

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
2017-04-05 10:13 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : 2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : BQ_BEGIN >>what is result of EXPLAIN statement for slow and fast cases? >> >>regards >> >>Pavel For work_mem=32MB

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Pavel Stehule
2017-04-05 10:13 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com>: > 2017-04-05 9:28 GMT+02:00 Daniel Westermann services.com>: > >> >>what is result of EXPLAIN statement for slow and fast cases? >> >> >> >>regards >> >> >> >>Pavel >> >> For work_mem=32MB >> >> explain (analyze,v

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : >>what is result of EXPLAIN statement for slow and fast cases? >> >>regards >> >>Pavel For work_mem=32MB explain (analyze,verbose,buffers) select count(user_id) from users where user_id not in ( selec

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Pavel Stehule
2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com>: > >>what is result of EXPLAIN statement for slow and fast cases? > >> > >>regards > >> > >>Pavel > > For work_mem=32MB > > explain (analyze,verbose,buffers) select count(user_id) from users where > user_id not in (

[GENERAL] expensive function in select list vs limit clause

2017-04-05 Thread Chris Mair
Hi, I've found a (simple) situation where the planner does something I don't understand. Below is a complete test case followed by output. From the timings it appears that in the second explain analyze query a function call in the select list (expensive()) is evaluated in the sequential scan n

[GENERAL] calculating table and index size

2017-04-05 Thread Günce Kaya
Hi all, I have some questions about calculating table and index size. I have a dummy table which has an integer column and its index. The table has 140 rows and all of rows are same thats value is 2000. Table size is 50MB and index size is 31MB. Why there is too much size difference betwe

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
>>what is result of EXPLAIN statement for slow and fast cases? >> >>regards >> >>Pavel For work_mem=32MB explain (analyze,verbose,buffers) select count(user_id) from users where user_id not in ( select id from ids); QUERY PLAN -

Re: [GENERAL] Keycloak and Postgres

2017-04-05 Thread Marc Tempelmeier
Hi, Thanks for your answer! Can you elaborate a bit on this part: " Because of how Postgres caches changes, you may find that a failover requires some time in recovery mode." Thanks! -Ursprüngliche Nachricht- Von: Bill Moran [mailto:wmo...@potentialtech.com] Gesendet: Saturday, April

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Pavel Stehule
2017-04-05 8:57 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com>: > >> I have set work_mem to a very low value intentionally for demonstration > >> purposes: > >> > >> postgres=# show work_mem; > >> work_mem > >> -- > >> 16MB > >> (1 row) > >> > >> postgres=# show shared