Re: [GENERAL] repmgr won't update witness after failover

2015-08-14 Thread Aviel Buskila
Hey, yes I did .. and still it wont fail back.. 2015-08-13 16:23 GMT+03:00 Jony Vesterman Cohen : > Hi, did you make the old master follow the new one using repmgr? > > It doesn't update itself automatically... > From the looks of it repmgr thinks you have 2 masters - the old one > offline and th

Re: [GENERAL] Foreign Keys as first class citizens at design time?

2015-08-14 Thread Stephen Feyrer
Hi, I agree with each of the points you've made. The idea here is meant as an extension of what is already available. So yes, this is intended to answer the questions of the designer's original model. The consideration being that you design your database and the underlying logic of your

Re: [GENERAL] Migrations

2015-08-14 Thread Martín Marqués
El 13/08/15 a las 23:17, Adrian Klaver escribió: > On 08/13/2015 05:37 PM, Martín Marqués wrote: >> El 13/08/15 a las 21:23, Guyren Howe escribió: >>> >>> I also think migrations ought to be a first-class feature… >> >> What do you mean with "migrations ought to be a first-class feature"? >> >> The

Re: [GENERAL] repmgr won't update witness after failover

2015-08-14 Thread Martín Marqués
El 14/08/15 a las 04:14, Aviel Buskila escribió: > Hey, > yes I did .. and still it wont fail back.. Can you send over the output of "repmgr cluster show" before and after the failover process? The output of SELECT * FROM repmgr_schema.repl_nodes; after the failover (you need to change repmgr_sch

[GENERAL] Postgresql jsonb

2015-08-14 Thread Deepak Balasubramanyam
Hi, I have a table (20 million rows) in Postgresql 9.4 that contains a bigint id as the primary key and another column that contains jsonb data. Queries run on this table look like so... ## Query select ... from table WHERE table.column ->'item'->> 'name' = 'value' -

Re: [GENERAL] Postgresql jsonb

2015-08-14 Thread Bill Moran
On Fri, 14 Aug 2015 17:39:49 +0530 Deepak Balasubramanyam wrote: > > I have a table (20 million rows) in Postgresql 9.4 that contains a bigint > id as the primary key and another column that contains jsonb data. Queries > run on this table look like so... > > > ## Query > --

Re: [GENERAL] Postgresql jsonb

2015-08-14 Thread David Rowley
On 15 August 2015 at 00:09, Deepak Balasubramanyam wrote: > Hi, > > I have a table (20 million rows) in Postgresql 9.4 that contains a bigint > id as the primary key and another column that contains jsonb data. Queries > run on this table look like so... > > > ## Query >

Re: [GENERAL] I am unable to install PostgreSql

2015-08-14 Thread Melvin Davidson
Shashank, as stated before, you need to install on a _supported_ O/S. Windows 2003 is NO LONGER SUPPORTED. So install on Windows 7, Windows 8 or the just released Windows 10. On Thu, Aug 13, 2015 at 11:42 PM, Shashank wrote: > Hi Melvin > > Thanks for responding. I am using postgresql-9.4.4-3

Re: [GENERAL] I am unable to install PostgreSql

2015-08-14 Thread Adrian Klaver
On 08/14/2015 06:00 AM, Melvin Davidson wrote: Shashank, as stated before, you need to install on a _supported_ O/S. Windows 2003 is NO LONGER SUPPORTED. Not sure that is relevant. So: 1) Where are you getting the Postgres installer from? 2) When you uninstalled are you sure it actually un

[GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
Hello list,Apologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number. I want the count for each column by column.I have inherited a database consisting of two related huge monolithic tables that lack referential i

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
Well it is certainly nice to see that my choice to send my question using plain text was honored by this email service. Apologies for that mess. The output I am looking for is a series of rows with two columns, one the name of the table column, and the other the count of non-null values in a tab

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Rowley
On 15 August 2015 at 02:32, David Nelson wrote: > Hello list,Apologies if this has been asked before. My search only > turned up ways to list the total non-null values for all columns as a > single number. I want the count for each column by column.I have > inherited a database consisting of two

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread John McKown
David, It still came through as junk. But I reconstructed it below === original message === Apologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number. I want the count for each column by column. I have inherited a

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread Tom Lane
David Rowley writes: > On 15 August 2015 at 02:32, David Nelson wrote: >> Hello list,Apologies if this has been asked before. My search only >> turned up ways to list the total non-null values for all columns as a >> single number. I want the count for each column by column. > I assume the table

Re: [GENERAL] I am unable to install PostgreSql

2015-08-14 Thread Shashank
Hi Melvin Thanks for responding. I am using postgresql-9.4.4-3 version to install. However I am getting the same issue with postgresql-9.3.9-3 version as well. Kindly suggest, what needs to be done. Regards Shashank From: Mel

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread Sachin Srivastava
Congrats to all PostgreSQL DBA’s for this achievement.. HERE ARE THE WINNERS OF THE 2015 DBTA READERS' CHOICE AWARDS FOR BEST DATABASE (OVERALL): Winner: PostgreSQL Finalists: Oracle Database Microsoft SQL Server

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Jeff Janes
> On Thu, Aug 13, 2015 at 1:37 PM, Melvin Davidson wrote: > On Thu, Aug 13, 2015 at 3:49 PM, Jeff Janes wrote: > >> I am looking for an extension or a technique that will allow me to >> intercept a query by the exact query text, and replace that query with a >> different one. >> >> The context

[GENERAL] stack depth

2015-08-14 Thread Michael H
Hi All, I'm tuning up my database and need to increase the max_stack_depth parameter in postgresql.conf. I've edited the /etc/security/limits.conf and added * softstack 12288 * hardstack 12288 but I noticed the comments at the top of the file - #This fi

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Jeff Janes
On Thu, Aug 13, 2015 at 2:02 PM, Adrian Klaver wrote: > On 08/13/2015 12:49 PM, Jeff Janes wrote: > >> I am looking for an extension or a technique that will allow me to >> intercept a query by the exact query text, and replace that query with a >> different one. >> > > What is sending the query?

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Adrian Klaver
On 08/14/2015 08:56 AM, Jeff Janes wrote: On Thu, Aug 13, 2015 at 2:02 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 08/13/2015 12:49 PM, Jeff Janes wrote: I am looking for an extension or a technique that will allow me to intercept a query by the exact quer

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Melvin Davidson
Jeff, although it would be tedious, you could write a trigger of the form BEFORE INSERT ON yatta_yatta EXECUTE PROCEDURE check_rewrite; Then in check_rewrite, you could examine the contents of pg_stat_activity.query column for the current process and act accordingly. I acknowledge that it will im

Re: [GENERAL] stack depth

2015-08-14 Thread Chris Mair
> Hi All, > > I'm tuning up my database and need to increase the max_stack_depth > parameter in postgresql.conf. > > I've edited the /etc/security/limits.conf and added > * softstack 12288 > * hardstack 12288 > > but I noticed the comments at the top of th

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread Ravi Krishna
is there any details available on this poll ? thanks. On Thu, Aug 13, 2015 at 11:05 PM, Sachin Srivastava < sachin.srivast...@cyient.com> wrote: > Congrats to all PostgreSQL DBA’s for this achievement.. > > > > > HERE ARE THE WINNERS OF THE 2015 DBTA READERS' CHOICE AWARDS FOR BEST > DATABASE (O

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread John R Pierce
On 8/14/2015 11:06 AM, Ravi Krishna wrote: is there any details available on this poll ? the linked article links to this report, which requires registration to download. http://www.dbta.com/DBTA-Downloads/ResearchReports/The-Real-World-of-the-Database-Administrator-5237.aspx -- john r pie

Re: [GENERAL] PostgreSQL - The Best Overall Database

2015-08-14 Thread Melvin Davidson
Yes. >From my original post of CANu8FixZ=-o3nybdma5pxjsyzxqy1n0t4kekg0-1kkvs7fe...@mail.gmail.com Here is the associated url: http://www.dbta.com/Editorial/Trends-and-Applications/Best-Datab

Re: [GENERAL] Extension to rewrite queries before execution

2015-08-14 Thread Andy Colson
On 8/13/2015 2:49 PM, Jeff Janes wrote: I am looking for an extension or a technique that will allow me to intercept a query by the exact query text, and replace that query with a different one. The context is running a third-party app which issues queries I have no control over. I'd like to in

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
On Fri, Aug 14, 2015 at 9:59 AM, John McKown wrote: > > David, > > It still came through as junk. But I reconstructed it below > > === original message === > Apologies if this has been asked before. My search only turned up ways to list the total non-null values for all columns as a single number.

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread David Nelson
On Fri, Aug 14, 2015 at 10:00 AM, Tom Lane wrote: > > David Rowley writes: > > On 15 August 2015 at 02:32, David Nelson wrote: > >> Hello list,Apologies if this has been asked before. My search only > >> turned up ways to list the total non-null values for all columns as a > >> single number. I

Re: [GENERAL] Count of non-null values per table column

2015-08-14 Thread Ken Tanzer
On Fri, Aug 14, 2015 at 6:35 PM, David Nelson wrote: > On Fri, Aug 14, 2015 at 10:00 AM, Tom Lane wrote: > > > > David Rowley writes: > > Tthat is the way I would do it for a table with a small number of columns, > but these have several dozen so this would get tedious. Although I just > real