Re: [GENERAL] executing os commands from a function

2016-09-30 Thread Armand Pirvu (home)
Thanks for replies. Good deal of info While plsh seems to be an easier approach , I am also inclined in a an ESQL/C type app to listen to an event @Igor Neyman It is just maybe I have missed a sample of a C app in that area, similar like ESQLC Cheers Armand On Sep 30, 2016, at 10:45 AM,

Re: [GENERAL] [ANNOUNCE] pgAdmin 4 v1.0 Released!

2016-09-30 Thread Adrian Klaver
On 09/30/2016 11:32 AM, Tim Clarke wrote: On 30/09/16 18:35, Devrim Gündüz wrote: These are the -devel packages that I installed to build pgadmin4 RPMs: BuildRequires: mesa-libGL-devel BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel >= 5.1 BuildRequires: qt5-qtwebkit-devel

Re: [GENERAL] Frequent "pg_ctl status" removing(?) semaphores (unlikely)

2016-09-30 Thread raf
Michael Paquier wrote: > On Tue, Sep 27, 2016 at 2:13 PM, raf wrote: > > So, my qestion is, is it possible that "pg_ctl status" could be > > removing postgres's semaphores and can I stop it? It seems > > extremely unlikely. So, if it isn't, what else could it be? > > Systemd

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread David Rowley
On 1 October 2016 at 10:10, Tom Lane wrote: > David Rowley writes: >> On 1 October 2016 at 05:47, Tom Lane wrote: >>> Somebody will need to trace through this on Windows and see where it's >>> going off the rails. > >> I

Re: [GENERAL] pgadmin vs psql output

2016-09-30 Thread Tom Lane
Rakesh Kumar writes: > I have a bytea col which stores Java UUID data. When I run > Select cast(uuid_col as varchar) from table limit 1 > Output in pgadmin > -=== > "A001" > Output in psql > >

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Tom Lane
Rich Shepard writes: > On Fri, 30 Sep 2016, Tom Lane wrote: >> Wrong permissions on /dev/shm, perhaps? >Yes. I keep forgetting about this since I don't reboot this > server/workstation often. You ought to do some investigation and figure out what is causing it to

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Tom Lane
David Rowley writes: > On 1 October 2016 at 05:47, Tom Lane wrote: >> Somebody will need to trace through this on Windows and see where it's >> going off the rails. > I tried the test case on 9.6.0 on a Windows 8.1 machine, and it works > fine

[GENERAL] pgadmin vs psql output

2016-09-30 Thread Rakesh Kumar
I have a bytea col which stores Java UUID data. When I run Select cast(uuid_col as varchar) from table limit 1 Output in pgadmin -=== "A001" Output in psql \x4130303030303030303030303030303030303030303030303030303030303031 is there some

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Rakesh Kumar
I don't know if that's helpful to you or not, but hopefully it was at least a little. === yes it was. thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread David Rowley
On 1 October 2016 at 05:47, Tom Lane wrote: > FWIW, I tried your original example on Linux yesterday, and it seemed to > work fine --- it only wanted to use 1 worker, but the speedup was just > about exactly 2X with or without "explain analyze". So this is somehow > Windows

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Rich Shepard
On Fri, 30 Sep 2016, Tom Lane wrote: Wrong permissions on /dev/shm, perhaps? Tom, Yes. I keep forgetting about this since I don't reboot this server/workstation often. Thanks, Rich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] System crashed: fatal error restarting postgres [FIXED]

2016-09-30 Thread Rich Shepard
On Fri, 30 Sep 2016, Adrian Klaver wrote: See here: https://www.postgresql.org/message-id/24208.1473724630%40sss.pgh.pa.us Ah, shoot! I completely forgot about this. Yes, I reset the perms on /dev/shm and that fixed the problem. My apologies to all, Rich -- Sent via pgsql-general

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Adrian Klaver
On 09/30/2016 01:15 PM, Rich Shepard wrote: > A java application threw a major error when closing and it crashed my > system (including wiping out most of /tmp). After rebooting I su'd to user > postgres and tried to start postgresql-9.5.4, but this error displays: > > postgres@salmo:~$ FATAL:

Re: [GENERAL] isnull() function in pgAdmin3

2016-09-30 Thread Adrian Klaver
On 09/30/2016 08:18 AM, dudedoe01 wrote: Select version(); shows postgreSQL 9.6beta3, compiled by Visual C++ build 1800, 64-bit There is no isnull() in 9.6 either, if that is what you are asking? Otherwise what is the question you want answered? -- Adrian Klaver adrian.kla...@aklaver.com

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Tom Lane
Rich Shepard writes: >A java application threw a major error when closing and it crashed my > system (including wiping out most of /tmp). After rebooting I su'd to user > postgres and tried to start postgresql-9.5.4, but this error displays: > postgres@salmo:~$

Re: [GENERAL] [ANNOUNCE] pgAdmin 4 v1.0 Released!

2016-09-30 Thread Adrian Klaver
On 09/30/2016 11:32 AM, Tim Clarke wrote: On 30/09/16 18:35, Devrim Gündüz wrote: These are the -devel packages that I installed to build pgadmin4 RPMs: BuildRequires: mesa-libGL-devel BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel >= 5.1 BuildRequires: qt5-qtwebkit-devel

Re: [GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Adrian Klaver
On 09/30/2016 01:15 PM, Rich Shepard wrote: A java application threw a major error when closing and it crashed my system (including wiping out most of /tmp). After rebooting I su'd to user postgres and tried to start postgresql-9.5.4, but this error displays: postgres@salmo:~$ FATAL: could

[GENERAL] System crashed: fatal error restarting postgres

2016-09-30 Thread Rich Shepard
A java application threw a major error when closing and it crashed my system (including wiping out most of /tmp). After rebooting I su'd to user postgres and tried to start postgresql-9.5.4, but this error displays: postgres@salmo:~$ FATAL: could not open shared memory segment

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread
>> I've been reading this discussion with great interest, to see what >> other Postgres experts think. :-) > >I am bit disappointed that most of the replies are questioning why we are >doing what we are doing. Once again, we (db designers) have no choice in that. > What I would like to know

Re: [GENERAL] Graphical entity relation model

2016-09-30 Thread
> Does anybody know a Software for generating graphical entity relation models > from existing postgresql databases? > > Best regards Johannes I use dbWrench (dbwrench.com). It's not free, but they do have a free trial version so you can see if you like it before you buy it. It's also not

Re: [GENERAL] [ANNOUNCE] pgAdmin 4 v1.0 Released!

2016-09-30 Thread Tim Clarke
On 30/09/16 18:35, Devrim Gündüz wrote: > These are the -devel packages that I installed to build pgadmin4 RPMs: > BuildRequires:mesa-libGL-devel > BuildRequires:gcc-c++ > BuildRequires:qt5-qtbase-devel >= 5.1 > BuildRequires:qt5-qtwebkit-devel > BuildRequires:

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Rakesh Kumar
>Then you need different clusters per tenant. Otherwise, the WAL records > of different tenants are inextricably mingled together. Yes we are aware of it .This part is OK as it is not deemed as user table data. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Stephen Frost
* Jeff Janes (jeff.ja...@gmail.com) wrote: > On Fri, Sep 30, 2016 at 2:06 AM, Rakesh Kumar > wrote: > > We require complete data isolation. Absolutely nothing should be shared > > between two tenants. > > Then you need different clusters per tenant. Otherwise, the

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Jeff Janes
On Fri, Sep 30, 2016 at 2:06 AM, Rakesh Kumar wrote: > > We require complete data isolation. Absolutely nothing should be shared > between two tenants. > Then you need different clusters per tenant. Otherwise, the WAL records of different tenants are inextricably

Re: [GENERAL] [ANNOUNCE] pgAdmin 4 v1.0 Released!

2016-09-30 Thread Devrim Gündüz
Hi, On Fri, 2016-09-30 at 18:10 +0100, Tim Clarke wrote: > WebViewWindow.h:20:20: fatal error: QWebView: No such file or directory These are the -devel packages that I installed to build pgadmin4 RPMs: BuildRequires: mesa-libGL-devel BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel >=

Re: [GENERAL] isnull() function in pgAdmin3

2016-09-30 Thread dudedoe01
Select version(); shows postgreSQL 9.6beta3, compiled by Visual C++ build 1800, 64-bit -- View this message in context: http://postgresql.nabble.com/isnull-function-in-pgAdmin3-tp5923122p5923791.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via

Re: [GENERAL] [ANNOUNCE] pgAdmin 4 v1.0 Released!

2016-09-30 Thread Tim Clarke
On 29/09/16 15:29, Dave Page wrote: > The pgAdmin Development Team are pleased to announce the release of > pgAdmin 4 version 1.0. > > pgAdmin is the leading Open Source management and administration tool > for PostgreSQL. > > pgAdmin 4 is a complete rewrite of pgAdmin, built using Python and >

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Tom Lane
Jay Knight writes: > I've tried this on a CentOS VM (VirtualBox on Windows) that I gave 2 cores, > and it worked as expected (it launched workers with and without explain > analyze), so I've only been able to reproduce this on Windows. FWIW, I tried your original example on

Re: [GENERAL] Parallel query only when EXPLAIN ANALYZEd

2016-09-30 Thread Jay Knight
I've upped max_worker_processes to 16, but I still can't get it to launch workers unless I use EXPLAIN ANALYZE. I've also found that this simplified setup exhibits the same behavior: create table big as ( SELECT generate_series(1,3000) AS id ); explain analyze SELECT avg(id) from big

[GENERAL] ZSON, PostgreSQL extension for compressing JSONB

2016-09-30 Thread Aleksander Alekseev
Hello. I've just uploaded ZSON extension on GitHub: https://github.com/afiskon/zson ZSON learns on your common JSONB documents and creates a dictionary with strings that are frequently used in all documents. After that you can use ZSON type to compress documents using this dictionary. When

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Rakesh Kumar
> I've been reading this discussion with great interest, to see what other > Postgres experts think. :-) I am bit disappointed that most of the replies are questioning why we are doing what we are doing. Once again, we (db designers) have no choice in that. What I would like to know that which

Re: [GENERAL] executing os commands from a function

2016-09-30 Thread David G. Johnston
On Thu, Sep 29, 2016 at 2:41 PM, Armand Pirvu (home) wrote: > I used plsh extension but I had to use two functions and a trigger, see > code below > ​I don't see any way to not use a trigger given your requirement. And as written I don't see that you need the second

Re: [GENERAL] executing os commands from a function

2016-09-30 Thread Francisco Olarte
Armand On Thu, Sep 29, 2016 at 11:41 PM, Armand Pirvu (home) wrote: > I know this may sound like heresy since it involves executing an OS command > from a function , but here goes > After an insert in a table, I want to touch a file > I used plsh extension but I

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Paul Jungwirth
On Fri, Sep 30, 2016 at 6:06 AM, Rakesh Kumar wrote: A typical fear mongering Q from them "what if due to a bug in your s/w, our competitors end up looking at our data" or something like that. That's why schema level vs db level discussion. I've been reading this

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Colin Morelli
Rakesh, As long as one application knows how to connect to more than 1 tenant, there will *always* be the possibility that a software bug in your application causes one tenant to access another tenant's data. I think this is why you're getting people asking you to refine your requirements. There

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Vick Khera
On Fri, Sep 30, 2016 at 5:11 AM, John R Pierce wrote: > On 9/30/2016 2:06 AM, Rakesh Kumar wrote: >> >> We require complete data isolation. Absolutely nothing should be shared >> between two tenants. >> >> WHy would multiple dbs be any worse than multiple schemas in

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Vick Khera
On Fri, Sep 30, 2016 at 6:06 AM, Rakesh Kumar wrote: > A typical fear mongering Q from > them "what if due to a bug in your s/w, our competitors end up looking at our > data" or > something like that. That's why schema level vs db level discussion. So... if your

Re: [GENERAL] executing os commands from a function

2016-09-30 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Armand Pirvu (home) Sent: Thursday, September 29, 2016 5:42 PM To: pgsql-general@postgresql.org Subject: [GENERAL] executing os commands from a function All I know this

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Jerome Wagner
you could also use a hybrid approach : - have a systematic tenant_id field in your tables, allowing for 1 db / 1 schema multi-tenants - give your application the ability to set the schema path for a tenant, so it will locate the tenant schema if it has a decidated schema - maybe go to the

Re: [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Masahiko Sawada
On Fri, Sep 30, 2016 at 6:40 PM, Thomas Kellerer wrote: > Tom Lane schrieb am 29.09.2016 um 23:10: >> Thomas Kellerer writes: >>> for some reason pg_upgrade failed on Windows 10 for me, with an error >>> message that one specifc _vm file couldn't be

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Rakesh Kumar
> ok, thats ridiculous, isn't it. so now its time to find a compromise. You don't understand how sales people pitch our products. We deal with financial data and our customers are extremely sensitive to even imagining that their data will co-reside with that of their competitors who also are

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Achilleas Mantzios
Via schemata if the tenants represent sub entities of the same organization. This gives the top level mgmt the ability to have a consolidated view of the whole organization. On 30/09/2016 12:06, Rakesh Kumar wrote: From: Venkata B Nagothi

Re: [GENERAL] pg_upgrade from 9.5 to 9.6 fails with "invalid argument"

2016-09-30 Thread Thomas Kellerer
Tom Lane schrieb am 29.09.2016 um 23:10: > Thomas Kellerer writes: >> for some reason pg_upgrade failed on Windows 10 for me, with an error >> message that one specifc _vm file couldn't be copied. > > Hmm ... a _vm file would go through rewriteVisibilityMap(), which is new >

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread John R Pierce
On 9/30/2016 2:06 AM, Rakesh Kumar wrote: We require complete data isolation. Absolutely nothing should be shared between two tenants. WHy would multiple dbs be any worse than multiple schemas in performance? complete? use 1000s of seperate VM instances, one per tennant. ok, thats

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Rakesh Kumar
From: Venkata B Nagothi Sent: Friday, September 30, 2016 02:48 To: Rakesh Kumar Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Multi tenancy : schema vs databases On Fri, Sep 30, 2016 at 10:16 AM, Rakesh Kumar

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-30 Thread Venkata B Nagothi
On Fri, Sep 30, 2016 at 10:16 AM, Rakesh Kumar wrote: > > > > From: Venkata B Nagothi > Sent: Thursday, September 29, 2016 17:25 > To: Rakesh Kumar > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL]