Re: [GENERAL] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Tue, Jul 23, 2013 at 1:11 PM, Amit Langote wrote: > Hello, > > While understanding the effect of maintenance_work_mem on time taken > by CREATE INDEX, I observed that for the values of > maintenance_work_mem less than the value for which an internal sort is > performed, the time taken by CREATE

Re: [GENERAL] Different transaction log for database/schema

2013-07-23 Thread Luca Ferrari
On Mon, Jul 22, 2013 at 10:09 AM, Ondrej Chaloupka wrote: > Hello, > > I would like kindly ask for an advice whether and how the transaction log > behavior could be configured. > > I would like to have possibility to differentiate transaction logs for two > databases or schema. I would need such c

[GENERAL] Viewing another role's search path?

2013-07-23 Thread Ian Lawrence Barwick
Is there some simple way of viewing the search path (or other role-specific setting) for a role different to the current role? Apart from querying 'pg_db_role_setting' directly? Just wondering if I'm missing something obvious. Regards Ian Barwick -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] Different transaction log for database/schema

2013-07-23 Thread Ondrej Chaloupka
Hi, I'm talking about transaction log for XA/2PC transactions. My tests crash application in some phase of the transaction. After restart I would like check how the recovery proceeded and I would like verify that all the transaction records (I mean info about prepare tx) are gone on DB site.

Re: [GENERAL] Viewing another role's search path?

2013-07-23 Thread Michael Paquier
On Tue, Jul 23, 2013 at 9:15 PM, Ian Lawrence Barwick wrote: > Is there some simple way of viewing the search path (or other > role-specific setting) for a role different to the current role? Apart from > querying 'pg_db_role_setting' directly? > This one perhaps? select rolname, rolconfig from pg

Re: [GENERAL] Viewing another role's search path?

2013-07-23 Thread Ian Lawrence Barwick
2013/7/23 Michael Paquier : > > On Tue, Jul 23, 2013 at 9:15 PM, Ian Lawrence Barwick > wrote: >> >> Is there some simple way of viewing the search path (or other >> role-specific setting) for a role different to the current role? Apart >> from >> querying 'pg_db_role_setting' directly? > > This o

Re: [GENERAL] Viewing another role's search path?

2013-07-23 Thread Adrian Klaver
On 07/23/2013 05:15 AM, Ian Lawrence Barwick wrote: Is there some simple way of viewing the search path (or other role-specific setting) for a role different to the current role? Apart from querying 'pg_db_role_setting' directly? Just wondering if I'm missing something obvious. http://www.post

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Jeff Janes
On Mon, Jul 22, 2013 at 9:11 PM, Amit Langote wrote: > Hello, > > While understanding the effect of maintenance_work_mem on time taken > by CREATE INDEX, I observed that for the values of > maintenance_work_mem less than the value for which an internal sort is > performed, the time taken by CREATE

Fwd: [GENERAL] odd locking behaviour

2013-07-23 Thread pg noob
Thank you Jeff and others for the responses. One concern that I have is that even cases where there is no deadlock it is still acquiring stronger locks than necessary. I only discovered it because of the deadlock issue but I presume that there are many cases where it is acquiring a lock on the fo

[GENERAL] process deadlocking on its own transactionid?

2013-07-23 Thread Kevin Goess
We're seeing a problem with some of our processes hanging on locks. The select below makes it look like it's *waiting* for a ShareLock on transactionid, but it *has* an ExclusiveLock on the same value in virtualxid. That makes it look like the process has deadlocked on its own transactionid. Or

Re: [GENERAL] odd locking behaviour

2013-07-23 Thread Alvaro Herrera
Moshe Jacobson escribió: > I wish one of the PG developers would respond to this... Have you seen the thread in pgsql-bugs? http://www.postgresql.org/message-id/e1uwamw-vh...@wrigleys.postgresql.org -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Sup

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Jeff Janes
On Tue, Jul 23, 2013 at 1:23 AM, Amit Langote wrote: > On Tue, Jul 23, 2013 at 1:11 PM, Amit Langote wrote: >> Hello, >> >> While understanding the effect of maintenance_work_mem on time taken >> by CREATE INDEX, I observed that for the values of >> maintenance_work_mem less than the value for wh

Re: [GENERAL] process deadlocking on its own transactionid?

2013-07-23 Thread Jeff Janes
On Tue, Jul 23, 2013 at 12:54 PM, Kevin Goess wrote: > We're seeing a problem with some of our processes hanging on locks. The > select below makes it look like it's *waiting* for a ShareLock on > transactionid, but it *has* an ExclusiveLock on the same value in > virtualxid. It has an Exclusive

Re: [GENERAL] process deadlocking on its own transactionid?

2013-07-23 Thread Alvaro Herrera
Jeff Janes escribió: > The transaction it is waiting for is in the transactionid column, > which is not in your select list. The virtualxid column seems pretty > useless to me, I don't really know why it is there. If you do CREATE INDEX CONCURRENTLY and it has to wait for other processes to fini

[GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Some Developer
I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I don't understand this argument. If you implement all of your logic in the application then you need to make a network request to the database serve

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread hidayat365
I presume you're refering to trigger. Since trigger often do something automagically :) and it sometime make developer hard to debug when something wrong since they they do not aware that there are triggers exist in database. Stored procedure is OK. CIIMW Sent from my BlackBerry® powered by Sin

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Adrian Klaver
On 07/23/2013 05:29 PM, Some Developer wrote: I've done quite a bit of reading on stored procedures recently and the consensus seems to be that you shouldn't use them unless you really must. I don't understand this argument. If you implement all of your logic in the application then you need to

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Kevin Goess
On Tue, Jul 23, 2013 at 5:40 PM, Adrian Klaver wrote: > On 07/23/2013 05:29 PM, Some Developer wrote: > >> I'm in the middle of building a database and was going to make extensive >> use of stored procedures and trigger functions because it makes more >> sense for the actions to happen at the data

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread John Meyer
Taking an absolutist position either way is pretty blind. What is the purpose of the procedure? Is it enforcing business rules? Are these rules that must be enforced against already existing data or are they more akin to validation of a credit card. How many people are accessing your datab

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Some Developer
On 24/07/13 01:55, John Meyer wrote: Taking an absolutist position either way is pretty blind. What is the purpose of the procedure? Is it enforcing business rules? Are these rules that must be enforced against already existing data or are they more akin to validation of a credit card. How m

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Andrew Sullivan
On Tue, Jul 23, 2013 at 06:55:56PM -0600, John Meyer wrote: > are accessing your database at one time? And most importantly, what > are you best at? That is one of the most important questions, for sure, but there's a close second that I'd suggest: what are the scaling properties? For practical

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Wed, Jul 24, 2013 at 6:02 AM, Jeff Janes wrote: > On Tue, Jul 23, 2013 at 1:23 AM, Amit Langote wrote: >> On Tue, Jul 23, 2013 at 1:11 PM, Amit Langote >> wrote: >>> Hello, >>> >>> While understanding the effect of maintenance_work_mem on time taken >>> by CREATE INDEX, I observed that for t

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Wed, Jul 24, 2013 at 11:30 AM, Amit Langote wrote: > On Wed, Jul 24, 2013 at 6:02 AM, Jeff Janes wrote: >> If you are using trace_sort to report that, it reports the switch as >> happening as soon as it runs out of memory. >> >> At point, all we have been doing is reading tuples into memory.

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Some Developer
On 24/07/13 02:56, Andrew Sullivan wrote: On Tue, Jul 23, 2013 at 06:55:56PM -0600, John Meyer wrote: are accessing your database at one time? And most importantly, what are you best at? That is one of the most important questions, for sure, but there's a close second that I'd suggest: what a

Re: [GENERAL] Why are stored procedures looked on so negatively?

2013-07-23 Thread Albe Laurenz
Some Developer wrote: > On 24/07/13 01:55, John Meyer wrote: > > Taking an absolutist position either way is pretty blind. What is the > > purpose of the procedure? Is it enforcing business rules? Are these > > rules that must be enforced against already existing data or are they > > more akin

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Wed, Jul 24, 2013 at 3:20 AM, Jeff Janes wrote: > On Mon, Jul 22, 2013 at 9:11 PM, Amit Langote wrote: >> Hello, >> >> While understanding the effect of maintenance_work_mem on time taken >> by CREATE INDEX, I observed that for the values of >> maintenance_work_mem less than the value for whic