Re: [GENERAL] How to best archetect Multi-Tenant SaaS application using Postgres

2016-08-01 Thread Venkata Balaji N
On Sun, Jul 31, 2016 at 12:07 PM, Silk Parrot wrote: > Hi, > > We are trying build a multi tenant application and are debating which > approach we should take: (also my understanding is based on that pgbouncer > connection pool doesn’t work across different user/database pair): > > 1. For each

Re: [GENERAL] Re: Query planner using hash join when merge join seems orders of magnitude faster

2016-08-01 Thread Tom Lane
Branden Visser writes: > I just wanted to update that I've found evidence that fixing the > planner row estimation may not actually influence it to use the more > performant merge join instead of hash join. I have found instances > where the row estimation is *overestimated* by a magnitude of 4x >

Re: [GENERAL] Force pg_hba.conf user with LDAP

2016-08-01 Thread Jeff Janes
On Mon, Aug 1, 2016 at 1:32 PM, John McKown wrote: > On Mon, Aug 1, 2016 at 2:49 PM, Jeff Janes wrote: >> >> On Mon, Aug 1, 2016 at 11:40 AM, Joseph Kregloh >> wrote: >> > Hi, >> > >> > Is there a way to force the user being sent to LDAP? >> > >> > For example I have the following entry in my pg

Re: [GENERAL] Force pg_hba.conf user with LDAP

2016-08-01 Thread Tom Lane
John McKown writes: >​Perhaps what is necessary is something akin to the UNIX "sudo" facility. > That is, an SQL statement prefix which, if used, runs the given SQL > statement as a PG superuser. You then GRANT(?) authority to that facility > like you would to a table or database or ... . E.g. G

Re: [GENERAL] Force pg_hba.conf user with LDAP

2016-08-01 Thread John McKown
On Mon, Aug 1, 2016 at 2:49 PM, Jeff Janes wrote: > On Mon, Aug 1, 2016 at 11:40 AM, Joseph Kregloh > wrote: > > Hi, > > > > Is there a way to force the user being sent to LDAP? > > > > For example I have the following entry in my pg_hba.conf file: > > hostapdb apuser 10.0.

Re: [GENERAL] Force pg_hba.conf user with LDAP

2016-08-01 Thread Jeff Janes
On Mon, Aug 1, 2016 at 11:40 AM, Joseph Kregloh wrote: > Hi, > > Is there a way to force the user being sent to LDAP? > > For example I have the following entry in my pg_hba.conf file: > hostapdb apuser 10.0.20.1/22 ldap > ldapserver="389-ds1.sl.com:389" ldapbasedn=

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-08-01 Thread Bruce Momjian
On Mon, Aug 1, 2016 at 11:54:00AM -0700, Jeff Janes wrote: > > Uh, that is only true if the slowness was in _dumping_ many objects. > > Most of the fixes have been for _restoring_ many objects, and that is > > done in the new cluster, so they should be OK. > > There have been improvements on both

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-08-01 Thread Jeff Janes
On Thu, Jul 28, 2016 at 3:16 PM, Bruce Momjian wrote: > On Thu, Jul 28, 2016 at 12:35:23AM -0700, Jeff Janes wrote: >> On Wed, Jul 27, 2016 at 9:48 PM, John R Pierce wrote: >> > On 7/27/2016 9:39 PM, Jeff Janes wrote: >> >> >> >> That depends on how how many objects there are consuming that 1 TB.

[GENERAL] Force pg_hba.conf user with LDAP

2016-08-01 Thread Joseph Kregloh
Hi, Is there a way to force the user being sent to LDAP? For example I have the following entry in my pg_hba.conf file: hostapdb apuser 10.0.20.1/22 ldap ldapserver="389-ds1.sl.com:389" ldapbasedn="dc=sl,dc=com" - I will be connecting as apuser. - I will supply my

Re: [GENERAL] Can stored procedures be deployed online

2016-08-01 Thread Karsten Hilbert
On Mon, Aug 01, 2016 at 12:48:57PM -0400, Rakesh Kumar wrote: > Can an existing stored procedure be modified online while other users > are executing it. In Oracle, the session doing CREATE OR REPLACE > PACKAGE would wait for other session to complete. Once the package is > changed, first time oth

[GENERAL] Can stored procedures be deployed online

2016-08-01 Thread Rakesh Kumar
Can an existing stored procedure be modified online while other users are executing it. In Oracle, the session doing CREATE OR REPLACE PACKAGE would wait for other session to complete. Once the package is changed, first time other sessions will get an error "package invalidated". How is it in PG.

[GENERAL] consolidating data with window functions

2016-08-01 Thread Andrew Geery
I have a data-set with - a line number - a name - a value I want to select the rows in line number order, but I want to consolidate consecutive rows into a single row, concatenating the names, if the value is null. For example, here's my data: values ( (1, 'a', 1), (2, 'b', 2), (3, 'c', null), (

[GENERAL] How to best archetect Multi-Tenant SaaS application using Postgres

2016-08-01 Thread Silk Parrot
Hi,   We are trying build a multi tenant application and are debating which approach we should take: (also my understanding is based on that pgbouncer connection pool doesn’t work across different user/database pair): 1.  For each tenant, we create a dedicated database and a dedicated user. Thi

Re: [GENERAL] pg_archivecleanup standalone bash script

2016-08-01 Thread Alvaro Herrera
Patrick B wrote: > This has been resolved. How? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:/

[GENERAL] Re: Query planner using hash join when merge join seems orders of magnitude faster

2016-08-01 Thread Branden Visser
I just wanted to update that I've found evidence that fixing the planner row estimation may not actually influence it to use the more performant merge join instead of hash join. I have found instances where the row estimation is *overestimated* by a magnitude of 4x (estimates 2.4m rows) and still c

Re: [SPAM] Re: [GENERAL] WAL directory size calculation

2016-08-01 Thread Moreno Andreo
Il 29/07/2016 15:30, David G. Johnston ha scritto: On Fri, Jul 29, 2016 at 7:08 AM, Moreno Andreo wrote: ​R​

Re: [GENERAL] Proposal "stack trace" like debugging option in PostgreSQL

2016-08-01 Thread Charles Clavadetscher
Hello On 08/01/2016 12:15 AM, Tom Lane wrote: Edson Richter writes: From: t...@sss.pgh.pa.us Uh, doesn't the CONTEXT field of error messages give you that already? Would you give me an example where I can get the info you mention above? Do I need to enable some kind of parameter to get thi