Re: [GENERAL] Perfomance issue. statement in the log file..

2016-02-23 Thread Roxanne Reid-Bennett
On 2/23/2016 11:57 AM, Bala Venkat wrote: Dear All - We are seeing lot of these statements in the log file. We have 2 functions . Submit and update . Between submit and update which will int the process, the messages are appearning. The process is very slow. We don't know if this the

Re: [GENERAL] ERROR: missing FROM-clause entry for table

2016-02-11 Thread Roxanne Reid-Bennett
On 2/11/2016 2:15 AM, bigkev wrote: ... This stores the start_time, which is the date and time a series of calls begins. The duration defines how long this event(call) will go for, and the end_time defines when the schedule will stop. I need to generate a calendar eg: 1 year with intervals of 1 d

Re: [GENERAL] ERROR: missing FROM-clause entry for table

2016-02-10 Thread Roxanne Reid-Bennett
On 2/10/2016 1:33 AM, bigkev wrote: Yes, c.start_time is a timestamp. It is really late where I am, so I apologize if I'm being dense... My goal is to list events (calls) which are scheduled on fortnightly basis. The query works with hard coded values, but I need to generate results for days

Re: [GENERAL] ERROR: missing FROM-clause entry for table

2016-02-10 Thread Roxanne Reid-Bennett
On 2/9/2016 11:11 PM, bigkev wrote: I am receiving this error for the query pasted below. Is the LEFT JOIN on the table not enough? What needs to happen here? I am guess something to do with derived tables http://pastie.org/10715876 Your error is in the reference to c.start_time, c.end_time.

Re: [GENERAL] A motion

2016-01-25 Thread Roxanne Reid-Bennett
On 1/25/2016 12:55 AM, Albe Laurenz wrote: Regina Obe wrote: At this point I feel we should: ... While I personally feel that a code of conduct does not need to be an explicit document and is something that "happens" through the way people on the lists behave and the way the core team and lis

Re: [GENERAL] A motion

2016-01-24 Thread Roxanne Reid-Bennett
On 1/23/2016 3:31 PM, Joshua D. Drake wrote: On 01/23/2016 03:08 PM, Adrian Klaver wrote: On 01/23/2016 03:03 PM, Berend Tober wrote: Adrian Klaver wrote: Motion: The Coc discussion be moved to its own list where those who care can argue to their hearts content and leave the rest of us to de

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-05 Thread Roxanne Reid-Bennett
On 1/5/2016 6:13 PM, Joshua D. Drake wrote: On 01/05/2016 05:31 PM, Jim Nasby wrote: Well, that highlights that it's not just about a CoC, it's the things that surround it. Especially what the conflict resolution policy is. I suspect JD thought about this because of a recent Facebook thread[1]

Re: [GENERAL] XID wraparound with huge pg_largeobject

2015-12-01 Thread Roxanne Reid-Bennett
On 11/30/2015 9:58 AM, David Kensiski wrote: I am working with a client who has a 9.1 database rapidly approaching XID wraparound. They also have an exceedingly large pg_largeobject table (4217 GB) that has never been vacuumed. An attempt to vacuum this on a replica has run for days and never

Re: [GENERAL] controlling memory management with regard to a specific query (or groups of connections)

2015-11-19 Thread Roxanne Reid-Bennett
On 11/19/2015 12:29 PM, Bill Moran wrote: On Wed, 18 Nov 2015 20:10:00 -0500 Jonathan Vanasco wrote: As a temporary fix I need to write some uploaded image files to PostgreSQL until a task server can read/process/delete them. The problem I've run into (via server load tests that model our pr

Re: [GENERAL] controlling memory management with regard to a specific query (or groups of connections)

2015-11-18 Thread Roxanne Reid-Bennett
On 11/18/2015 5:10 PM, Jonathan Vanasco wrote: As a temporary fix I need to write some uploaded image files to PostgreSQL until a task server can read/process/delete them. The problem I've run into (via server load tests that model our production environment), is that these read/writes end up

Re: [GENERAL] Best practices for aggregate table design

2015-10-09 Thread Roxanne Reid-Bennett
On 10/9/2015 3:16 PM, droberts wrote: Thanks for everyone's help. Can anyone recommend a good book on database modeling, around these 'cube' or aggregate concepts in particular? I'm using Postgres but shouldn't matter too much I assume. Given the shift towards NoSQL for BI, and the age of the

Re: [GENERAL] Database designpattern - product feature

2015-06-03 Thread Roxanne Reid-Bennett
On 6/3/2015 2:50 AM, Adrian Stern wrote: Hi William, thanks for joining the conversation. 1) We do hope for constraints since a connection to an ERP system is possible in the future. We want to plan ahead. 2) As for the subclass approach: I would need about 30 subclasses and it will get real

Re: [GENERAL] Creating composite keys from csv

2015-03-08 Thread Roxanne Reid-Bennett
On 3/8/2015 11:49 PM, Eli Murray wrote: Hi all, I'm a student journalist working on a project for our student paper which lists salaries and positions for every staff member at the university. We received the data from an FOI request but the university is refusing to give us primary keys for

Re: [GENERAL] autovacuum worker running amok - and me too ;)

2015-03-03 Thread Roxanne Reid-Bennett
On 3/3/2015 6:17 PM, Tom Lane wrote: wambacher writes: My system has 24GB of real memory but after some hours one autovacuum worker is using 80-90% of memory, the OOM-Killer (out of memory killer) kills the process with kill -9 and the postgresql-server is restarting because of that problem. i

Re: [GENERAL] What is the alternate of FILTER below Postgresql 9.4 ?

2015-02-24 Thread Roxanne Reid-Bennett
On 2/24/2015 11:29 AM, Arup Rakshit wrote: On Tuesday, February 24, 2015 06:13:21 PM Pavel Stehule wrote: Hi 2015-02-24 17:02 GMT+01:00 Arup Rakshit : Hi, Please look at my query : [shreyas@rails_app_test (master)]$ rails db psql (9.4.1) Type "help" for help. app_development=# select id, l

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-19 Thread Roxanne Reid-Bennett
obert.difa...@gmail.com>> wrote: I don't think an advisory lock would remove the deadlock. For 2 or more hometown inserts per transaction - I agree - it won't fix it. Glad to hear you have it fixed. Roxanne On Sun, Jan 18, 2015 at 10:33 PM, Roxanne Reid-Bennett mailt

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-18 Thread Roxanne Reid-Bennett
On 1/16/2015 2:41 AM, Jim Nasby wrote: On 1/15/15 10:57 PM, Roxanne Reid-Bennett wrote: try this: (if you still get deadlocks, uncomment the advisory lock [thanks Daniel] and try again) Logically I suppose it might run faster to do the select, then insert "if". I almost always w

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-15 Thread Roxanne Reid-Bennett
On 1/15/2015 6:12 PM, Robert DiFalco wrote: FWIW I was using the select_hometown_id FUNCTION like this: INSERT INTO users(...) values(..., select_hometown_id('Portland, OR')); try this: (if you still get deadlocks, uncomment the advisory lock [thanks Daniel] and try again) Logically I suppos

Re: [GENERAL] Simple Atomic Relationship Insert

2015-01-13 Thread Roxanne Reid-Bennett
I don't like loops to catch "failure" condition... can you possibly fail to stop? In a stored procedure (or with auto-commit turned off in any transaction)... You can avoid any race condition by using a semaphore (e.g. you lock "something" for the duration of the critical part of your process

Re: [GENERAL] Updating single/multiple fields of JSON document

2014-12-09 Thread Roxanne Reid-Bennett
On 12/9/2014 3:38 PM, Bruce Momjian wrote: On Mon, Dec 8, 2014 at 04:56:00PM +0530, bln prasad wrote: Hi, Is there any way to update single/multiple fields of JSON document of a column? No, not yet. We are thinking of options but don't have any work in progress. Given a pretty distinct w

Re: [GENERAL] Analyze against a table with geometry columns runs out of memory

2014-05-08 Thread Roxanne Reid-Bennett
On 5/8/2014 7:07 AM, Paul Ramsey wrote: Roxanne, you seem to have isolated the problem to a particular geometry column, which speaks to this being a PostGIS problem. ok - wrong list - sorry! Since the analyze code was re-written in 2.1, and your issue is coming up in a 2.0>2.1 upgrade, that fur

[GENERAL] Analyze against a table with geometry columns runs out of memory

2014-05-07 Thread Roxanne Reid-Bennett
Hello, We are working out the upgrade of our servers from Postgres 9.1 and Postgis 2.0 to Postgres 9.3 and Postgis 2.1 After building the base stack, The System Admin restored the database from a backup. [I'll ask for more details if you need them] I have 3 tables with geometry columns in the

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-17 Thread Roxanne Reid-Bennett
On 4/16/2014 2:40 PM, Robert DiFalco wrote: Thanks Roxanne, I suppose when it comes down to it -- for the current use cases and data size -- my only concern is the "calling" query that will need to use max to determine if a user has already had a call today. For a large user set, for each user

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-16 Thread Roxanne Reid-Bennett
On 4/15/2014 9:10 PM, Robert DiFalco wrote: 1. >500K rows per day into the calls table. 2. Very rarely. The only common query is gathering users that have not been called "today" (along with some other qualifying criteria). More analytical queries/reports are done for internal use and it is not

Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-15 Thread Roxanne Reid-Bennett
On 4/14/2014 12:27 PM, Robert DiFalco wrote: And so on for calls_connected, calls_completed, call_errors, etc. Occasionally I will want to know things like "When was the last time a user answered a call" or "How many times has a user been called". ... Sometimes I might want to get this data fo