Re: [SPAM] Re: [SPAM] Re: [GENERAL] Best practices to manage custom statistics

2016-11-24 Thread Adrian Klaver
On 11/24/2016 09:59 AM, Moreno Andreo wrote: Hi Adrian, First of all: now I've seen that not all fields touched by WHERE Aah, I get it now. You are refreshing forms every 60 seconds over 350 users each with their own database. Actually worse then that as there is user overlap over

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread azhwkd
Adrian Klaver schrieb am Do., 24. Nov. 2016 um 22:34 Uhr: > On 11/24/2016 01:23 PM, azhwkd wrote: > > It should not be possible because a group does not return to the > > update pool before the update hasn't finished. > > So what is this 'update pool' and what is

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread azhwkd
It should not be possible because a group does not return to the update pool before the update hasn't finished. I watched the queries in a postgres client and there was no overlap I could see. I don't really know what to make from this behavior, sometimes when I start the application a few updates

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread Adrian Klaver
On 11/24/2016 01:23 PM, azhwkd wrote: It should not be possible because a group does not return to the update pool before the update hasn't finished. So what is this 'update pool' and what is driving/using it? In other words how is the determination of the parameters done? To be more

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread rob stone
On Thu, 2016-11-24 at 22:23 +0100, azhwkd wrote: > It should not be possible because a group does not return to the > update pool before the update hasn't finished. > I watched the queries in a postgres client and there was no overlap I > could see. > I don't really know what to make from this

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread John R Pierce
On 11/24/2016 5:44 PM, Yogesh Sharma wrote: I cannot change calling of REINDEX and insert query sequence because it is execute automatically through some cron script. any cron scripts are your own doing, so this statement makes no sense at all. -- john r pierce, recycling bits in santa

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Tom Lane
Yogesh Sharma writes: > ERROR: deadlock detected > DETAIL: Process 2234 waits for AccessShareLock on relation 16459 of > database 16385; blocked by process 4111. > Process 4111 waits for ShareLock on relation 16502 of database 16385; > blocked by process

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Michael Paquier
On Fri, Nov 25, 2016 at 11:14 AM, Sameer Kumar wrote: > Does this mean that you reindex quite often based on a schedule. Personally I > don't prefer that. To me it is like you are trying to fix something that is > not broken. > > Ideally reindex only what needs to be

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Yogesh Sharma
Dear John, Thanks for your support. I mean to say, the REINDEX calls hourly and insert query executes every minute to update. So, it might be race condition that these queries can call at same time. If there is any solution like we can add some check before REINDEX operation performed. If it

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Jan de Visser
On 2016-11-24 9:06 PM, Yogesh Sharma wrote: Dear John, Thanks for your support. I mean to say, the REINDEX calls hourly and insert query executes every minute to update. So, it might be race condition that these queries can call at same time. Why do you need to run REINDEX every hour? That

[GENERAL] Query regarding deadlock

2016-11-24 Thread Yogesh Sharma
Dear All, Thanks in advance. I found below deadlock in postgresql logs. I cannot change calling of REINDEX and insert query sequence because it is execute automatically through some cron script. ERROR: deadlock detected DETAIL: Process 2234 waits for AccessShareLock on relation 16459 of

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Sameer Kumar
On Fri, 25 Nov 2016, 10:07 a.m. Yogesh Sharma, < yogesh1.sha...@nectechnologies.in> wrote: > Dear John, > > Thanks for your support. > I mean to say, the REINDEX calls hourly and insert query executes every > minute to update. > So, it might be race condition that these queries can call at same

Re: [GENERAL] Wal files - Question | Postgres 9.2

2016-11-24 Thread Patrick B
2016-11-23 16:18 GMT+13:00 Venkata B Nagothi : > > On Wed, Nov 23, 2016 at 1:59 PM, Patrick B > wrote: > >> >> >> 2016-11-23 15:55 GMT+13:00 Venkata B Nagothi : >> >>> >>> >>> On Wed, Nov 23, 2016 at 1:03 PM, Patrick B

Re: [GENERAL] Wal files - Question | Postgres 9.2

2016-11-24 Thread Michael Paquier
On Fri, Nov 25, 2016 at 10:05 AM, Patrick B wrote: > If I get messages like: > > cp: cannot stat '/walfiles/00021AF800A5': No such file or > directory > > In my head, it's saying that it was unable to recover that file and, because > of that, there is missing

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Sameer Kumar
On Fri, 25 Nov 2016, 9:45 a.m. Yogesh Sharma, < yogesh1.sha...@nectechnologies.in> wrote: > Dear All, > > Thanks in advance. > I found below deadlock in postgresql logs. > I cannot change calling of REINDEX and insert query sequence because it is > execute automatically through some cron script.

Re: [GENERAL] Backup "Best Practices"

2016-11-24 Thread Vick Khera
On Wed, Nov 23, 2016 at 1:16 PM, Israel Brewster wrote: > I was wondering if someone could inform me about, or point me to an online > article about best practices for backing up a postgresql database cluster? > At the moment, I have two servers running with streaming

[GENERAL] Invoice Table Design

2016-11-24 Thread Robert Heinen
I was wondering if anyone might be able to help me out with a table design question. A quick intro -- I'm helping a company switch from a mongo database over to postgresql (yay!). The company is a marketplace app for musicians and hosts. The basic idea is that a host can book a musician for an

[GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread David Richer
Hi guys, I want to check my production server for the free space map issue. https://wiki.postgresql.org/wiki/Free_Space_Map_Problems I am on Centos 6 currently running 9.3.14 using pgdg repository. I need to install postgresql93-contrib to get the pg_freespacemap extension. Only

Re: [GENERAL] Invoice Table Design

2016-11-24 Thread Melvin Davidson
On Thu, Nov 24, 2016 at 9:17 AM, Robert Heinen wrote: > I was wondering if anyone might be able to help me out with a table design > question. > > A quick intro -- I'm helping a company switch from a mongo database over > to postgresql (yay!). The company is a marketplace

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread David Richer
I am not an expert but I am assuming that the native part of the extension (pg_freespacemap.so) is compiled with postgresql headers and libs. On 2016-11-24, 11:55 AM, "Adrian Klaver" wrote: On 11/24/2016 07:40 AM, David Richer wrote: > Hi guys, > >

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread Adrian Klaver
On 11/24/2016 09:01 AM, David Richer wrote: I am not an expert but I am assuming that the native part of the extension (pg_freespacemap.so) is compiled with postgresql headers and libs. The part that confused me is the last part where you ask about using a 9.3.14 extension with a 9.3.15

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread Tom Lane
Adrian Klaver writes: > On 11/24/2016 09:01 AM, David Richer wrote: >> I am not an expert but I am assuming that the native part of the extension >> (pg_freespacemap.so) is compiled with postgresql headers and libs. > The part that confused me is the last part where

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread Adrian Klaver
On 11/23/2016 10:26 PM, azhwkd wrote: I'm sorry. I worded this quite poorly. I meant to say that there were no log lines added to the postgres logfile at the time. I hope these are the settings you were refferring to (I did not change anything in the config files vs. the default)

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread Adrian Klaver
On 11/23/2016 10:41 PM, azhwkd wrote: The group ID is part of the primary key of the group_history table. My understanding is that two INSERTs with different group IDs should not collide in this case, or am I wrong in thinking this? The suspicion is that this: insert into group_history

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread Adrian Klaver
On 11/23/2016 10:41 PM, azhwkd wrote: The group ID is part of the primary key of the group_history table. My understanding is that two INSERTs with different group IDs should not collide in this case, or am I wrong in thinking this? The table definition for group_history is the following:

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread Vladimir Rusinov
Maybe, maybe not. Have you tried installing '=postgresql93-contrib-9.3.14' ? On Thu, Nov 24, 2016 at 3:41 PM David Richer wrote: > Hi guys, > > > > I want to check my production server for the free space map issue. >

Re: [GENERAL] Invoice Table Design

2016-11-24 Thread Rich Shepard
On Thu, 24 Nov 2016, Robert Heinen wrote: A quick intro -- I'm helping a company switch from a mongo database over to postgresql (yay!). The company is a marketplace app for musicians and hosts. The basic idea is that a host can book a musician for an event, like a wedding or a birthday. Also,

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread David Richer
Yes, I tried, it’s no longer available in the pgdg repository. I would have a look if I find the rpm package somewhere. From: Vladimir Rusinov Date: Thursday, November 24, 2016 at 11:19 AM To: David Richer , "pgsql-general@postgresql.org"

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread Adrian Klaver
On 11/24/2016 07:40 AM, David Richer wrote: Hi guys, I want to check my production server for the free space map issue. https://wiki.postgresql.org/wiki/Free_Space_Map_Problems I am on Centos 6 currently running 9.3.14 using pgdg repository. I need to install postgresql93-contrib to get

Re: [SPAM] Re: [SPAM] Re: [GENERAL] Best practices to manage custom statistics

2016-11-24 Thread Moreno Andreo
Hi Adrian, First of all: now I've seen that not all fields touched by WHERE clauses in queries are indexed. Time to try some indices and EXPLAIN a bit (I must be blind... I've checked it multiple times) Scroll down for the rest of the thread. Il 23/11/2016 16:59, Adrian Klaver

Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread David Richer
Yes are right, I meant a 9.3.15 extension with a 9.3.14 server. Thanks for the help guys! On 2016-11-24, 12:10 PM, "Tom Lane" wrote: Adrian Klaver writes: > On 11/24/2016 09:01 AM, David Richer wrote: >> I am not an expert but I am

Re: [GENERAL] query locks up when run concurrently

2016-11-24 Thread Adrian Klaver
On 11/23/2016 10:41 PM, azhwkd wrote: The group ID is part of the primary key of the group_history table. My understanding is that two INSERTs with different group IDs should not collide in this case, or am I wrong in thinking this? After fresh coffee: In your first post you had this: "(In

Re: [GENERAL] performance problems with bulk inserts/updates on tsrange with gist-based exclude constrains

2016-11-24 Thread Chris Withers
Hey Tom, I appreciate you're busy, but did you ever get a chance to look at this? On 19/09/2016 08:40, Chris Withers wrote: On 16/09/2016 15:29, Tom Lane wrote: Chris Withers writes: On 16/09/2016 14:54, Igor Neyman wrote: So, what is the value for "end ts", when