[GENERAL] Serialization exception : Who else was involved?

2014-11-25 Thread Olivier MATROT
I'm using PostgreSQL 9.2.8 on Windows x64. When a transaction as SERIALIZABLE isolation level is failing, is there a way to know which connection(s), thus transaction(s), were involved in the overall process ? I'm working on an accounting database. I know that we should retry the

[GENERAL] Best filesystem for a high load db

2014-11-25 Thread Maila Fatticcioni
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I need to install a Postgresql 9.4 cluster with two servers at first instance. The database will be used in an enviroment with high load, a lot number of clients will do queries that require fast replies. I have to install Ubuntu 14.04 as OS

Re: [GENERAL] Best filesystem for a high load db

2014-11-25 Thread Christoph Berg
Re: Bill Moran 2014-11-25 20141125111630.d05d58a9eb083c7cf80ed...@potentialtech.com Anything with a journal is a performance problem. PostgreSQL effectivly does its own journalling with the WAL logs. That's not to say that there's no value to crash recovery to having a journalling filesystem,

Re: [GENERAL] Best filesystem for a high load db

2014-11-25 Thread Bill Moran
On Tue, 25 Nov 2014 16:43:49 +0100 Maila Fatticcioni mfatticci...@mbigroup.it wrote: Hello, I need to install a Postgresql 9.4 cluster with two servers at first instance. The database will be used in an enviroment with high load, a lot number of clients will do queries that require fast

Re: [GENERAL] Best filesystem for a high load db

2014-11-25 Thread Bill Moran
On Tue, 25 Nov 2014 17:27:18 +0100 Christoph Berg c...@df7cb.de wrote: Re: Bill Moran 2014-11-25 20141125111630.d05d58a9eb083c7cf80ed...@potentialtech.com Anything with a journal is a performance problem. PostgreSQL effectivly does its own journalling with the WAL logs. That's not to say

[GENERAL] users per database

2014-11-25 Thread Willy-Bas Loos
Hi, I'm moving a database out of an existing cluster, and was wondering which users i need to take with it. So i made 2 little queries that show the users that have rights in the database, maybe they wil come in handy for someone else too. --show owners of objects in this database select

[GENERAL] SQL functions and triggers?

2014-11-25 Thread Alban Hertroys
Hi all, In the past, when writing trigger functions, I’ve always used pl/pgsql without giving it a second thought. Today I was modifying a database creation script that was originally intended for Firebird to work with Postgres and the example trigger procedures in there were very close to

Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-25 Thread Dev Kumkar
On Fri, Nov 21, 2014 at 1:14 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: If there are foreign keys on the tables, the system internally runs some SELECT FOR KEY SHARE queries on the referenced tables (the ones containing the primary or unique keys). You can get some multixacts that

Re: [GENERAL] SQL functions and triggers?

2014-11-25 Thread Bill Moran
On Tue, 25 Nov 2014 21:41:12 +0100 Alban Hertroys haram...@gmail.com wrote: Hi all, In the past, when writing trigger functions, I?ve always used pl/pgsql without giving it a second thought. Today I was modifying a database creation script that was originally intended for Firebird to work

[GENERAL] Lock Management: Waiting on locks

2014-11-25 Thread Dev Kumkar
Am debugging a race condition scenario where multiple transaction are running in parallel and there are insert/update these transactions are performing. I was able to identify the blocking query and blocked query using following SQL. However observed the blocking query is holding the locks on

Re: [GENERAL] Best filesystem for a high load db

2014-11-25 Thread Andy Colson
On 11/25/2014 9:43 AM, Maila Fatticcioni wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I need to install a Postgresql 9.4 cluster with two servers at first instance. The database will be used in an enviroment with high load, a lot number of clients will do queries that require

Re: [GENERAL] SQL functions and triggers?

2014-11-25 Thread Tom Lane
Alban Hertroys haram...@gmail.com writes: In the past, when writing trigger functions, I’ve always used pl/pgsql without giving it a second thought. Today I was modifying a database creation script that was originally intended for Firebird to work with Postgres and the example trigger

[GENERAL] returning only part of a rule set

2014-11-25 Thread Dave Potts
I have a psql function that make a general sql query, returns a set of results Q. Is there anyway that I can limit the size of the result sets ? Dave. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] returning only part of a rule set

2014-11-25 Thread David G Johnston
Dave Potts wrote I have a psql function that make a general sql query, returns a set of results Q. Is there anyway that I can limit the size of the result sets ? SELECT * FROM somewhere LIMIT 50; --- David J. btw: what is a psql function? -- View this message in context:

Re: [GENERAL] returning only part of a rule set

2014-11-25 Thread Adrian Klaver
On 11/25/2014 01:27 PM, Dave Potts wrote: I have a psql function that make a general sql query, returns a set of results Q. Is there anyway that I can limit the size of the result sets ? Put a LIMIT on the query. If that is not what you want then we will need to see the code and/or get a

Re: [GENERAL] returning only part of a rule set

2014-11-25 Thread Dave Potts
On 25/11/14 21:36, Adrian Klaver wrote: On 11/25/2014 01:27 PM, Dave Potts wrote: I have a psql function that make a general sql query, returns a set of results Q. Is there anyway that I can limit the size of the result sets ? Put a LIMIT on the query. If that is not what you want then we

Re: [GENERAL] returning only part of a rule set

2014-11-25 Thread Adrian Klaver
On 11/25/2014 01:56 PM, Dave Potts wrote: On 25/11/14 21:36, Adrian Klaver wrote: On 11/25/2014 01:27 PM, Dave Potts wrote: I have a psql function that make a general sql query, returns a set of results Q. Is there anyway that I can limit the size of the result sets ? Put a LIMIT on the

Re: [GENERAL] returning only part of a rule set

2014-11-25 Thread David G Johnston
Adrian Klaver-4 wrote If I am only interested in get 2 entries per result set, I would expect to see Actually =2. How do you determine which rows to keep, by id or something else? 1 xx,yy 2 xx,yy 1,dd,zz 2,dd,zz 1, ee,ff Using LIMIT only gives 1 xx,yy 2 xx,yy Sorry for not

Re: [GENERAL] returning only part of a rule set

2014-11-25 Thread Dave Potts
On 25/11/14 22:24, David G Johnston wrote: Thanks List, I think this is the right way to go. Adrian Klaver-4 wrote If I am only interested in get 2 entries per result set, I would expect to see Actually =2. How do you determine which rows to keep, by id or something else? 1 xx,yy 2 xx,yy

Re: [GENERAL] SQL functions and triggers?

2014-11-25 Thread Alban Hertroys
On 25 Nov 2014, at 22:24, Tom Lane t...@sss.pgh.pa.us wrote: Alban Hertroys haram...@gmail.com writes: In the past, when writing trigger functions, I’ve always used pl/pgsql without giving it a second thought. Today I was modifying a database creation script that was originally intended

Re: [GENERAL] Avoiding deadlocks when performing bulk update and delete operations

2014-11-25 Thread Sanjaya Vithanagama
On Tue, Nov 25, 2014 at 4:42 AM, Bill Moran wmo...@potentialtech.com wrote: On Mon, 24 Nov 2014 14:51:42 +1100 Sanjaya Vithanagama svithanag...@gmail.com wrote: Hi All, We have a single table which does not have any foreign key references. id_A (bigint) id_B (bigint) val_1

Re: [GENERAL] Avoiding deadlocks when performing bulk update and delete operations

2014-11-25 Thread Bill Moran
On Wed, 26 Nov 2014 10:41:56 +1100 Sanjaya Vithanagama svithanag...@gmail.com wrote: * How frequently do deadlocks occur? We are seeing deadlocks about 2-3 times per day in the production server. To reproduce the problem easily we've written a simple Java class with multiple threads

Re: [GENERAL] Estimating WAL usage during pg_basebackup

2014-11-25 Thread Sameer Kumar
On Fri, Oct 31, 2014 at 2:52 AM, Mike Blackwell mike.blackw...@rrd.com wrote: I need to get an idea of how much WAL space will be required during a long (many hours) pg_basebackup over a relatively slow network connection. This is for a server that's not yet running PITR / streaming. Any

Re: [GENERAL] is there a warm standby sync trigger?

2014-11-25 Thread Sameer Kumar
On Fri, Oct 24, 2014 at 8:01 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Fri, Oct 24, 2014 at 12:30 AM, John Smith jayzee.sm...@gmail.com wrote: i want to setup a warm standby that listens 24/7 but only syncs when told to (ie only when i am ok with the database updates, will i

Re: [GENERAL] Lock Management: Waiting on locks

2014-11-25 Thread Bill Moran
On Wed, 26 Nov 2014 02:37:51 +0530 Dev Kumkar devdas.kum...@gmail.com wrote: Am debugging a race condition scenario where multiple transaction are running in parallel and there are insert/update these transactions are performing. I was able to identify the blocking query and blocked query