Re: Ynt:[GENERAL] postgresql : could not serialize access due to read/write dependencies among transactions

2017-01-17 Thread Christoph Moench-Tegeder
## John R Pierce (pie...@hogranch.com): > that reason code doesn't sound like anything PostgreSQL generates. > SQLSTATE 40001 is "serialization_failure", but all that stuff about > 'identification as a pivot' ?that must be your ORM. That's PostgreSQL: https://wiki.postgresql.org/wiki/SSI Reg

Re: Ynt:[GENERAL] postgresql : could not serialize access due to read/write dependencies among transactions

2017-01-17 Thread John R Pierce
On 1/17/2017 9:41 PM, Neslisah Demirci wrote: First I started conversation between two person ; sql: 'INSERT INTO "X" ("id","customer","createdAt","updatedAt","CompanyId") VALUES (DEFAULT,\'905322653555\',\'2017-01-17 19:13:37.751 +00:00\',\'2017-01-17 19:13:37.751 +00:00\',\'1\') RETU

Ynt:[GENERAL] postgresql : could not serialize access due to read/write dependencies among transactions

2017-01-17 Thread Neslisah Demirci
Gönderen: Neslisah Demirci Gönderildi: 18 Ocak 2017 Çarşamba 08:36 Kime: John R Pierce Konu: Ynt: [GENERAL] postgresql : could not serialize access due to read/write dependencies among transactions We use ORM sequelize.js . My transactions are here ; First I s

Re: [GENERAL] postgresql : could not serialize access due to read/write dependencies among transactions

2017-01-17 Thread John R Pierce
On 1/17/2017 8:54 PM, Neslisah Demirci wrote: could not serialize access due to read/write dependencies among transactions only way to answer this would be to know what the various concurrent transactions are doing. A message app like whatsapp i decided to use isolation level serializa

[GENERAL] postgresql : could not serialize access due to read/write dependencies among transactions

2017-01-17 Thread Neslisah Demirci
Hi , I have problem about this issue ; could not serialize access due to read/write dependencies among transactions A message app like whatsapp i decided to use isolation level serializable if i use other transaction levels many conversations started with same number (think about whatsapp

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Chris Mair
On 17/01/17 23:21, Tomas Vondra wrote: Hi, after looking at the explain plans again, I very much doubt those come from the same query. The reason is the 9.5 plan contains this part: -> HashAggregate (cost=67.54..68.12 rows=192 width=4) Group Key: d.vip_patient_id ->

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Tomas Vondra
Hi, after looking at the explain plans again, I very much doubt those come from the same query. The reason is the 9.5 plan contains this part: -> HashAggregate (cost=67.54..68.12 rows=192 width=4) Group Key: d.vip_patient_id -> Nested Loop (cost=0.17..67.44 rows=192

Re: [GENERAL] Fwd: [webmaster] Update query issue

2017-01-17 Thread John R Pierce
On 1/17/2017 1:04 PM, Adrian Klaver wrote: On Jan 17, 2017, at 5:33 AM, kumar s > wrote: Hi team thanks for giving option I am getting update problem ...after update row thst row appended end of the table ...i need update row without change row position i

Re: [GENERAL] Fwd: [webmaster] Update query issue

2017-01-17 Thread Adrian Klaver
On 01/17/2017 08:43 AM, kumar s wrote: -- Forwarded message -- From: *Jonathan S. Katz* mailto:jk...@postgresql.org>> Date: Tue, Jan 17, 2017 at 9:33 PM Subject: Re: [webmaster] Update query issue To: kumar s mailto:leelaseshuku...@gmail.com>> Cc: webmas...@postgresql.org

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
Chris, Here is the explain analyze plan. QUERY PLAN

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Tomas Vondra
On 01/17/2017 08:31 PM, Ravi Tammineni wrote: Hi, We have recently upgraded to 9.6 and few queries are performing very poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy execution plan is also completely changed. I am not sure whether its because of Parallel feature or an

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Chris Mair
Hi. explain analyze SELECT count(*) [...] QUERY PLAN - Aggregate (cost=

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Melvin Davidson
On Tue, Jan 17, 2017 at 3:12 PM, Ravi Tammineni < rtammin...@partner.aligntech.com> wrote: > Hi Adrain, > > We have deployed our databases in Heroku and we have followed the upgrade > option that they have provided to us. Here is the command. > > heroku pg:upgrade --app > > I am not sure whether

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
Hi Adrain, We have deployed our databases in Heroku and we have followed the upgrade option that they have provided to us. Here is the command. heroku pg:upgrade --app I am not sure whether they are doing the vacuum after the upgrade or not. I have disabled the parallel execution; still execu

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
Hi Melvin, We have deployed our databases in Heroku and we have followed the upgrade option that they have provided to us. Here is the command. heroku pg:upgrade --app I am not sure whether they are doing the vacuum after the upgrade. I have disabled the parallel execution; still execution pl

Re: [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Vik Fearing
On Tue, Jan 17, 2017 at 1:45 PM, Thomas Kellerer wrote: > Tom Lane schrieb am 17.01.2017 um 13:41: > > Thomas Kellerer writes: > >> So my question is: Is there any way to specify an alternate wildcard > escape when using LIKE ANY (..)? > > > > No, not with ESCAPE. [ manfully resists temptation

[GENERAL] Fwd: [webmaster] Update query issue

2017-01-17 Thread kumar s
-- Forwarded message -- From: Jonathan S. Katz Date: Tue, Jan 17, 2017 at 9:33 PM Subject: Re: [webmaster] Update query issue To: kumar s Cc: webmas...@postgresql.org Hi Kumar, This email address is for issues pertaining to the postgresql.org website. Your question is better su

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Adrian Klaver
On 01/17/2017 11:31 AM, Ravi Tammineni wrote: Hi, We have recently upgraded to 9.6 and few queries are performing very poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy execution plan is also completely changed. I am not sure whether its because of Parallel feature or

Re: [GENERAL] COPY to question

2017-01-17 Thread Steve Crawford
On Tue, Jan 17, 2017 at 10:23 AM, Rich Shepard wrote: > Running -9.6.1. I have a database created and owned by me, but cannot > copy > a table to my home directory. Postgres tells me it cannot write to that > directory. The only way to copy tables to files is by doing so as the > superuser (pos

Re: [GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Melvin Davidson
On Tue, Jan 17, 2017 at 2:31 PM, Ravi Tammineni < rtammin...@partner.aligntech.com> wrote: > Hi, > > > > We have recently upgraded to 9.6 and few queries are performing very > poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy > execution plan is also completely changed. I

[GENERAL] Queries are taking way longer in 9.6 than 9.5

2017-01-17 Thread Ravi Tammineni
Hi, We have recently upgraded to 9.6 and few queries are performing very poorly. Query execution time has increased more 4 or 5 times in 9.6. Qeruy execution plan is also completely changed. I am not sure whether its because of Parallel feature or any bug in 9.6. There are few similar kind of q

Re: [GENERAL] COPY to question

2017-01-17 Thread David G. Johnston
On Tue, Jan 17, 2017 at 11:23 AM, Rich Shepard wrote: > Running -9.6.1. I have a database created and owned by me, but cannot > copy > a table to my home directory. Postgres tells me it cannot write to that > directory. The only way to copy tables to files is by doing so as the > superuser (pos

Re: [GENERAL] COPY to question

2017-01-17 Thread Steve Atkins
> On Jan 17, 2017, at 10:23 AM, Rich Shepard wrote: > > Running -9.6.1. I have a database created and owned by me, but cannot copy > a table to my home directory. Postgres tells me it cannot write to that > directory. The only way to copy tables to files is by doing so as the > superuser (postg

Re: [GENERAL] COPY to question

2017-01-17 Thread Pavel Stehule
2017-01-17 19:23 GMT+01:00 Rich Shepard : > Running -9.6.1. I have a database created and owned by me, but cannot > copy > a table to my home directory. Postgres tells me it cannot write to that > directory. The only way to copy tables to files is by doing so as the > superuser (postgres). > >

Re: [GENERAL] COPY to question [ANSWERED]

2017-01-17 Thread Rich Shepard
On Tue, 17 Jan 2017, Tom Lane wrote: Use psql's \copy instead. Thanks, Tom. Rich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] COPY to question

2017-01-17 Thread Tom Lane
Rich Shepard writes: >Running -9.6.1. I have a database created and owned by me, but cannot copy > a table to my home directory. Postgres tells me it cannot write to that > directory. The only way to copy tables to files is by doing so as the > superuser (postgres). >Why is this, and can

[GENERAL] COPY to question

2017-01-17 Thread Rich Shepard
Running -9.6.1. I have a database created and owned by me, but cannot copy a table to my home directory. Postgres tells me it cannot write to that directory. The only way to copy tables to files is by doing so as the superuser (postgres). Why is this, and can I change something so I, as a use

Re: [GENERAL] Largepages in Windows

2017-01-17 Thread Andrew Kerber
Oh, I can answer that. The owner of the postgreSQL executable must have the privilege to lock pages in memory. On Tue, Jan 17, 2017 at 9:38 AM, Tom Lane wrote: > Andrew Kerber writes: > > Does PostgreSQL 9.4 support large pages in windows? The setting is there > > in the postgresql.conf, but

Re: [GENERAL] Largepages in Windows

2017-01-17 Thread Tom Lane
Andrew Kerber writes: > Does PostgreSQL 9.4 support large pages in windows? The setting is there > in the postgresql.conf, but I cant tell if it is supported in windows? No, but there's a pending patch for that: https://www.postgresql.org/message-id/flat/0A3221C70F24FB45833433255569204D1F5F1751

Re: [GENERAL] Largepages in Windows

2017-01-17 Thread Andrew Kerber
Thats what I needed, thank you. Windows generally calls them large pages, AIX also calls them large pages, really they are typically only called hugepages on Linux. On Tue, Jan 17, 2017 at 9:28 AM, Adrian Klaver wrote: > On 01/17/2017 07:20 AM, Andrew Kerber wrote: > >> Does PostgreSQL 9.4 supp

Re: [GENERAL] Largepages in Windows

2017-01-17 Thread Adrian Klaver
On 01/17/2017 07:20 AM, Andrew Kerber wrote: Does PostgreSQL 9.4 support large pages in windows? The setting is there in the postgresql.conf, but I cant tell if it is supported in windows? Are you talking about this?: https://www.postgresql.org/docs/9.4/static/runtime-config-resource.html hu

[GENERAL] Largepages in Windows

2017-01-17 Thread Andrew Kerber
Does PostgreSQL 9.4 support large pages in windows? The setting is there in the postgresql.conf, but I cant tell if it is supported in windows? -- Andrew W. Kerber 'If at first you dont succeed, dont take up skydiving.'

Re: [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Karsten Hilbert
On Tue, Jan 17, 2017 at 03:27:57PM +0100, Thomas Kellerer wrote: >> Do you need to have the _ NOT be recognized as a wildcard ? > > Yes, the underscore should NOT be a wildcard in this case. Understood. So, as Tom hinted at, your best bet might be to write a function escape_underscore_

[GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Thomas Kellerer
Karsten Hilbert schrieb am 17.01.2017 um 14:42: >> I recently stumbled over the need to use a wildcard escape character for a >> condition that makes use of LIKE ANY, something like: >> >>select * >>from some_table >>where name like any (array['foo_bar%', 'bar_foo%']) escape '/'; >> >>

Re: [GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Karsten Hilbert
On Tue, Jan 17, 2017 at 09:25:38AM +0100, Thomas Kellerer wrote: > I recently stumbled over the need to use a wildcard escape character for a > condition that makes use of LIKE ANY, something like: > >select * >from some_table >where name like any (array['foo_bar%', 'bar_foo%']) esca

[GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Thomas Kellerer
Tom Lane schrieb am 17.01.2017 um 13:41: > Thomas Kellerer writes: >> So my question is: Is there any way to specify an alternate wildcard escape >> when using LIKE ANY (..)? > > No, not with ESCAPE. [ manfully resists temptation to run down SQL > committee's ability to design composable synta

Re: [GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Tom Lane
Thomas Kellerer writes: > So my question is: Is there any way to specify an alternate wildcard escape > when using LIKE ANY (..)? No, not with ESCAPE. [ manfully resists temptation to run down SQL committee's ability to design composable syntax ... oops ] You could do what PG does under the h

[GENERAL] Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Thomas Kellerer
I recently stumbled over the need to use a wildcard escape character for a condition that makes use of LIKE ANY, something like: select * from some_table where name like any (array['foo_bar%', 'bar_foo%']) escape '/'; so that the underscore wouldn't be treated as a wildard (I can't real