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

2016-08-02 Thread Venkata Balaji N
> > How many concurrent connections can be made, will purely depend on number > of CPUs (cores) you have available on the database server. > Well, certainly 1 would be the way to go to build an multi-tenant > application, but, it strongly depends on your application specific > requirements and how

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

2016-08-02 Thread John R Pierce
On 8/1/2016 11:17 PM, Silk Parrot wrote: Yup, I also would like to go with 1, suppose a server with 16 core, 32GB memory, SSD box, how many connections could it handle roughly, e.g. O(100) or O(1000) or O(5000)? thats a fairly small server by today's standards, especially the 32GB ram part.

Re: [GENERAL] pg_restore out of memory

2016-08-02 Thread Miguel Ramos
Greetings, To all those who helped out with this problem, I'm sorry it took me so long to respond. For the record, the matter is solved, at least for us, but we had to repeat a lot of things to make sure. First, the "out of memory" problem repeated itself when restoring that single table, afte

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

2016-08-02 Thread Silk Parrot
Thanks for the response   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

Re: [GENERAL] pg_archivecleanup standalone bash script

2016-08-02 Thread Patrick B
I'll ajust the script and once is done will share here with u guys Patrick

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
This is now solved guys. There were three problems. 1 - I was looking for the logs on /var/lib/postgresql/9.2/main/pg_log. And it's wrong. On ubuntu, the logs are: /var/log/postgresql 2 - I just changed the max_stack_depth to the default DETAIL: "max_stack_depth" must not exceed 7680kB. > HINT

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
> > > Short version: > > That probably should be postgresql not postgres > > Long version: > > https://help.ubuntu.com/community/PostgreSQL > > >> > Yep.. my mistake.. /etc/init.d/postgresql start/stop/restart

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread John R Pierce
On 8/2/2016 1:17 PM, Patrick B wrote: Ubuntu 16.04.1 LTS How did you install Postgres and from where? apt-get install postgresql-9.2 postgresql-contrib-9.2 dpkg -l postgresql When I start it, it doesn't start... Show the command you used to start it. /etc/init.d/postg

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Adrian Klaver
On 08/02/2016 01:17 PM, Patrick B wrote: 2016-08-03 8:13 GMT+12:00 Adrian Klaver mailto:adrian.kla...@aklaver.com>>: On 08/02/2016 01:04 PM, Patrick B wrote: Hi guys, I've installed potgres on a Ubuntu machine. Postgres version? have a look on the subjec of this e

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
So, I found a log file on /var/log/postgres/ DETAIL: "max_stack_depth" must not exceed 7680kB. > HINT: Increase the platform's stack depth limit via "ulimit -s" or local > equivalent. > 2016-08-02 19:54:06.293 UTC|12960|FATAL: configuration file > "/etc/postgresql/9.2/main/postgresql.conf" cont

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
2016-08-03 8:13 GMT+12:00 Adrian Klaver : > On 08/02/2016 01:04 PM, Patrick B wrote: > >> Hi guys, >> >> I've installed potgres on a Ubuntu machine. >> > > Postgres version? > have a look on the subjec of this email (9.2) > > Ubuntu version? > Ubuntu 16.04.1 LTS > > How did you install Postg

Re: [GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Adrian Klaver
On 08/02/2016 01:04 PM, Patrick B wrote: Hi guys, I've installed potgres on a Ubuntu machine. Postgres version? Ubuntu version? How did you install Postgres and from where? When I start it, it doesn't start... Show the command you used to start it. /etc/init.d/postgresql status

[GENERAL] Postgresql 9.2 Ubuntu - is not starting

2016-08-02 Thread Patrick B
Hi guys, I've installed potgres on a Ubuntu machine. When I start it, it doesn't start... > /etc/init.d/postgresql status *●* postgresql.service - PostgreSQL RDBMS >Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor > preset: enabled) >Active: *active (exited)* sin

[GENERAL] Updated RUM-index and support for bigint as part of index

2016-08-02 Thread Andreas Joseph Krogh
Hi.   I see the RUM-index is updated, which is great!   I wonder, to be able to sort by timestamp one has to create the index like this:   CREATE INDEX rumidx ON origo_email_delivery USING rum (fts_all rum_tsvector_timestamp_ops, received_timestamp)WITH (attach = 'received_timestamp', TO = 'fts_

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Lmhelp1
Thank you for this note. Best regards, -- Léa Massiot On 2016-08-02 6:57 PM, Tom Lane wrote: Lmhelp1 writes: cmd.exe psql # \s history is not supported by this installation This means you have a copy of psql.exe that was built without the readline library, so history doesn't work either. I'

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Tom Lane
Lmhelp1 writes: > cmd.exe psql # \s > history is not supported by this installation This means you have a copy of psql.exe that was built without the readline library, so history doesn't work either. I'm not sure what the state of the readline library is for Windows; there may not be any version

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Lmhelp1
Thank you for your answer. I can't see any difference. In "Properties", there is an entry "Command History" with two fields "Buffer size" set to 50 and "Number of Buffers" set to 4. These settings are exactly the same in "cmd.exe" and "SQL Shell"... Best regards, -- Léa Massiot On 2016-08-0

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Adrian Klaver
On 08/02/2016 09:39 AM, Lmhelp1 wrote: Thank you for your answer. With the "SQL Shell" tool, the commands history is indeed available! So, I guess I am now going to use this tool instead of "cmd.exe". This solves my problem. Or look at the properties of the menu item and see what is done to e

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Lmhelp1
Thank you for your answer. With the "SQL Shell" tool, the commands history is indeed available! So, I guess I am now going to use this tool instead of "cmd.exe". This solves my problem. Thank you and best regards. -- Léa Massiot On 2016-08-02 6:27 PM, Adrian Klaver wrote: What happens if yo

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Adrian Klaver
On 08/02/2016 09:19 AM, Lmhelp1 wrote: Thank you for your answer. 1. Like I wrote in my first post, the command I use to launch "psql" is: cmd.exe> psql -p -U So, I do not specify the "--no-readline" option. 2. cmd.exe psql # \s history is not supported by this installation Powershell psql

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Lmhelp1
Thank you for your answer. 1. Like I wrote in my first post, the command I use to launch "psql" is: cmd.exe> psql -p -U So, I do not specify the "--no-readline" option. 2. cmd.exe psql # \s history is not supported by this installation Powershell psql # \s history is not supported by this in

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Melvin Davidson
On Tue, Aug 2, 2016 at 11:40 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Aug 2, 2016 at 11:31 AM, Melvin Davidson > wrote: > >> Are you doing this in PostgreSQL 7.3 and Windows XP? Can you provide us >> with a little more useful information like current PostgreSQL version

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread David G. Johnston
On Tue, Aug 2, 2016 at 11:31 AM, Melvin Davidson wrote: > Are you doing this in PostgreSQL 7.3 and Windows XP? Can you provide us > with a little more useful information like current PostgreSQL version and > O/S? > Otherwise we have absolutely no idea what the problem might be. > > "Windows (8.1)

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Lmhelp1
Thank you for your answer. cmd.exe> psql --version psql (PostgreSQL) 9.5.2 Like I wrote, the Windows OS is 8.1 Pro. Best regards, -- Léa Massiot On 2016-08-02 5:31 PM, Melvin Davidson wrote: Are you doing this in PostgreSQL 7.3 and Windows XP? Can you provide us with a little more useful inf

Re: [GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Melvin Davidson
Are you doing this in PostgreSQL 7.3 and Windows XP? Can you provide us with a little more useful information like current PostgreSQL version and O/S? Otherwise we have absolutely no idea what the problem might be. On Tue, Aug 2, 2016 at 11:18 AM, Lmhelp1 wrote: > Hello, > > I am using "psql" in

[GENERAL] Commands history with psql in a Windows command line shell

2016-08-02 Thread Lmhelp1
Hello, I am using "psql" in "cmd.exe" in Windows (8.1). Below is the command I use to connect to a database with "psql": cmd.exe> psql -p -U My problem is the following. Suppose I enter one command: # SELECT * FROM ; and then another one: # SELECT * FROM ; The commands history "is not workin

Re: [GENERAL] consolidating data with window functions

2016-08-02 Thread Ladislav Lenart
On 1.8.2016 18:48, Andrew Geery wrote: > 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

Re: [GENERAL] files in database directory

2016-08-02 Thread Grigory Smolkin
On 08/02/2016 04:51 PM, Adrian Klaver wrote: On 08/02/2016 06:44 AM, Grigory Smolkin wrote: Hello, everyone! I found some files in postgresql database directory: t13_14363083 t13_14363081 t13_14363098 Some of them are quite old. Can someone explain their purpose? https://www.postgresql.org

Re: [GENERAL] files in database directory

2016-08-02 Thread Adrian Klaver
On 08/02/2016 06:44 AM, Grigory Smolkin wrote: Hello, everyone! I found some files in postgresql database directory: t13_14363083 t13_14363081 t13_14363098 Some of them are quite old. Can someone explain their purpose? https://www.postgresql.org/docs/9.5/static/storage-file-layout.html " ...

[GENERAL] files in database directory

2016-08-02 Thread Grigory Smolkin
Hello, everyone! I found some files in postgresql database directory: t13_14363083 t13_14363081 t13_14363098 Some of them are quite old. Can someone explain their purpose? -- Grigory Smolkin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

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

2016-08-02 Thread Joseph Kregloh
On Mon, Aug 1, 2016 at 5:21 PM, Jeff Janes wrote: > 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 < > jkreg...@sproutloud.com> > >> wrote: > >> > Hi, > >> > > >> > Is there a w

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

2016-08-02 Thread Branden Visser
Thanks for your reply Tom. On Mon, Aug 1, 2016 at 6:56 PM, Tom Lane wrote: > 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 fo

Re: [GENERAL] pg_restore out of memory

2016-08-02 Thread Miguel Ramos
Greetings, To all those who helped out with this problem, I'm sorry it took me so long to respond. For the record, the matter is solved, at least for us, but we had to repeat a lot of things to make sure. First, the "out of memory" problem repeated itself when restoring that single table, after

[GENERAL] Upserting all excluded values

2016-08-02 Thread hari.prasath
Hi all, Is there any way to do insert on conflict update all the null rows with the excluded values. For ex: =>table1 will looks like=>table2 will looks like Column | Type | ModifiersColumn | Type | Modifi