[GENERAL] Very high latency, low bandwidth replication

2014-06-30 Thread Bob Jolliffe
Hi I have been grappling with a problem for some time I would appreciate some advice on. We have a public health application which is web based with a postgresql backing store which is designed for use by the public sector ministry of health in a significant number of African, Asian and other

Re: [GENERAL] [ADMIN] [pgadmin-support] Best backup strategy for production systems

2014-06-30 Thread Oliver
Ok, thanks. I mean by original wal segments to files generated in pg_xlog, yes. I have to 0 the parameter wal_keep_segments. They are being generated with 16MB of size and they are being rotated. What parameter controls how many files can be generated? Or will it grow indefinitely? Thanks

Re: [GENERAL] [pgadmin-support] Best backup strategy for production systems

2014-06-30 Thread Oliver
Thank you very much for your replies. Cheers... 2014-06-29 13:28 GMT+01:00 Michael Paquier michael.paqu...@gmail.com: On Fri, Jun 27, 2014 at 9:55 PM, Oliver ofab...@gmail.com wrote: Thank you very much for your reply. I've spoken with my boss, databases aren't so important, so if there

[GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Arup Rakshit
I have employee table. Where I have a column joining_date. Now I am looking for a way to get all employee, who completed 5 years, 10 years current month. How to do so ? I am not able to figure this out.   Regards, Arup Rakshit

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Szymon Guz
On 30 June 2014 12:38, Arup Rakshit arupraks...@rocketmail.com wrote: I have employee table. Where I have a column joining_date. Now I am looking for a way to get all employee, who completed 5 years, 10 years current month. How to do so ? I am not able to figure this out. Regards, Arup

Re: [GENERAL] [ADMIN] [pgadmin-support] Best backup strategy for production systems

2014-06-30 Thread Michael Paquier
Please avoid top-posting... On Mon, Jun 30, 2014 at 7:24 PM, Oliver ofab...@gmail.com wrote: Ok, thanks. I mean by original wal segments to files generated in pg_xlog, yes. I have to 0 the parameter wal_keep_segments. They are being generated with 16MB of size and they are being rotated.

Re: [GENERAL] Very high latency, low bandwidth replication

2014-06-30 Thread Francisco Olarte
Hi Bob. On Mon, Jun 30, 2014 at 10:05 AM, Bob Jolliffe bobjolli...@gmail.com wrote: What are people's thoughts about a more optimal solution? I would like to use a more incremental approach to replication. This does not have to be a live replication .. asynchronously triggering once every 24

[GENERAL] select users as per their years completion date current year

2014-06-30 Thread Arup Rakshit
Suppose I have users table. I have a joining_date. Now I only want those users who completed 5 years, 10 years, and in which date they completed.  Example: Out of all users, suppose below users only - Foo_1 on 24/1/2014 completed 10 years Foo_2 on 2/2/2014 completed  10 years Foo_3 on

Re: [GENERAL] Examples of projects that use Postgres as API server

2014-06-30 Thread Emre Hasegeli
I've been using Postgres for a small project and I've been very impressed by its flexibility in defining new types and functions. I very much like having the ability to define a clean relational model and then a set of functions that act as the API to the data stored in my model. Does

Re: [GENERAL] Examples of projects that use Postgres as API server

2014-06-30 Thread Bill Moran
On Mon, 30 Jun 2014 16:46:42 +0300 Emre Hasegeli e...@hasegeli.com wrote: I've been using Postgres for a small project and I've been very impressed by its flexibility in defining new types and functions. I very much like having the ability to define a clean relational model and then a set

Re: [GENERAL] Examples of projects that use Postgres as API server

2014-06-30 Thread Thomas Kellerer
Ben Ellis, 29.06.2014 03:10: Hi all, I've been using Postgres for a small project and I've been very impressed by its flexibility in defining new types and functions. I very much like having the ability to define a clean relational model and then a set of functions that act as the API to

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Rebecca Clarke
Hi Arup, Two ways come to mind for me. They're pretty much the same as Szymon's, just minus the sample table creation. I would suggest creating a view instead, so you can just select from it whenever you please. create view vw_employee as select * from employees where

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Arup Rakshit
On Monday, June 30, 2014 04:52:32 PM you wrote: Hi Arup, Two ways come to mind for me. They're pretty much the same as Szymon's, just minus the sample table creation. I would suggest creating a view instead, so you can just select from it whenever you please. create view vw_employee as

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Szymon Guz
On 30 June 2014 17:52, Rebecca Clarke r.clark...@gmail.com wrote: Hi Arup, Two ways come to mind for me. They're pretty much the same as Szymon's, just minus the sample table creation. I would suggest creating a view instead, so you can just select from it whenever you please. create

[GENERAL] Re: collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread David G Johnston
Rebecca Clarke-2 wrote create view vw_employee as select * from employees where ((age(joining_date::date) like '5 years%') or (age(joining_date::date) like '10 years%') ) This does not give the correct answer to the poster's question - the LIKE with a trailing % will pick up non-round

Re: [GENERAL] collecting employees who completed 5 and 10 years in the current month

2014-06-30 Thread Arup Rakshit
On Monday, June 30, 2014 04:52:32 PM Rebecca Clarke wrote: Hi Arup, Two ways come to mind for me. They're pretty much the same as Szymon's, just minus the sample table creation. I would suggest creating a view instead, so you can just select from it whenever you please. create view

[GENERAL] how to create a role with no privileges?

2014-06-30 Thread Kynn Jones
How does one define the most limited role/user possible in PostgreSQL? Ideally, this role would not be able to do *anything* at all. In particular, this role would not be able to query meta-information about existing tables, functions, etc. with backslash commands such as \dt, \df. (Of course,

Re: [GENERAL] how to create a role with no privileges?

2014-06-30 Thread Jerry Sievers
Kynn Jones kyn...@gmail.com writes: How does one define the most limited role/user possible in PostgreSQL? Ideally, this role would not be able to do *anything* at all.  In particular, this role would not be able to query meta-information about existing tables, functions, etc. with

[GENERAL] Cannot query views with WHERE clause on renamed columns

2014-06-30 Thread Alexander Reichstadt
Hi, I try to do what seems to be totally simple, but it fails. If I query a view that contains renamed columns without any qualifier like SELECT * FROM myview it displays everything. If however I do SELECT reanmedviewcolumn FROM myview It tells me column does not exist which in fact does. I

[GENERAL] lock contention, need profiling idea

2014-06-30 Thread AI Rumman
I see lots of similar log message at a certain time in a day on Postgresql 9,.1: LOG: process 18855 still waiting for ShareLock on transaction 2856146023 after 1001.209 ms STATEMENT: UPDATE table1 SET time = $1 WHERE id = $2 The table1 size is 17 G. What could be the reason for this lock

Re: [GENERAL] Cannot query views with WHERE clause on renamed columns

2014-06-30 Thread David G Johnston
Alexander Reichstadt wrote Hi, I try to do what seems to be totally simple, but it fails. If I query a view that contains renamed columns without any qualifier like SELECT * FROM myview it displays everything. If however I do SELECT reanmedviewcolumn FROM myview It tells me

Re: [GENERAL] Cannot query views with WHERE clause on renamed columns

2014-06-30 Thread Tom Lane
Alexander Reichstadt l...@mac.com writes: I try to do what seems to be totally simple, but it fails. If I query a view that contains renamed columns without any qualifier like SELECT * FROM myview it displays everything. If however I do SELECT reanmedviewcolumn FROM myview It tells me

[GENERAL] how to create multiple databases running in different dirs

2014-06-30 Thread frank ernest
Hi, Im new to postgresql and sql in general. I desired to write a program in C that used an sql data base for IPC and because multiple copies of my program might run on the same machine I wanted a way to ensure that only one copy of each multithreaded program got one database but Im uncertain how

Re: [GENERAL] how to create multiple databases running in different dirs

2014-06-30 Thread Rob Sargent
On 06/30/2014 05:58 PM, frank ernest wrote: Hi, I'm new to postgresql and sql in general. I desired to write a program in C that used an sql data base for IPC and because multiple copies of my program might run on the same machine I wanted a way to ensure that only one copy of each

Re: [GENERAL] lock contention, need profiling idea

2014-06-30 Thread Michael Paquier
On Tue, Jul 1, 2014 at 7:36 AM, AI Rumman rumman...@gmail.com wrote: I see lots of similar log message at a certain time in a day on Postgresql 9,.1: LOG: process 18855 still waiting for ShareLock on transaction 2856146023 after 1001.209 ms STATEMENT: UPDATE table1 SET time = $1 WHERE id

[GENERAL] pl/perl and recent perl versions - failing to load internal modules

2014-06-30 Thread Toby Corkindale
Hi, I've been trying out PostgreSQL 9.3 with pl/perl built against Ubuntu 14.04 LTS' Perl 5.18 (Sourced from apt.postgresql.org) Maybe I'm doing something wrong, but it appears that plperl has become completely useless, as it can't load any new modules, but modern Perl versions have refactored

Re: [GENERAL] how to create multiple databases running in different dirs

2014-06-30 Thread John R Pierce
On 6/30/2014 4:58 PM, frank ernest wrote: Hi, I'm new to postgresql and sql in general. I desired to write a program in C that used an sql data base for IPC and because multiple copies of my program might run on the same machine I wanted a way to ensure that only one copy of each multithreaded