[GENERAL] GIST optimization to limit calls to operator on sub nodes

2014-06-18 Thread Pujol Mathieu
Hello, My question is about GIST index. I made my own index to handle specific data and operators. It works pretty fine but I wonder if it was possible to optimize it. When I run my operator on a GIST node (in the method gist_range_consistent) it returns "NotConsistent" / "MaybeConsistent" / "F

Re: [GENERAL] pg_restore: custom archiver unexpected end of file , ERROR: missing data for column

2014-06-18 Thread Khangelani Gama
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, June 18, 2014 4:32 AM To: Khangelani Gama; Andres Freund; Tom Lane Cc: Alban Hertroys; Ziggy Skalski; pgsql-general@postgresql.org Subject: Re: [GENERAL] pg_restore: custom archiver unexpected end of

Re: [GENERAL] pg_restore: custom archiver unexpected end of file , ERROR: missing data for column

2014-06-18 Thread Khangelani Gama
-Original Message- From: Khangelani Gama [mailto:kg...@argility.com] Sent: Wednesday, June 18, 2014 1:06 PM To: 'Adrian Klaver'; 'Andres Freund'; 'Tom Lane' Cc: 'Alban Hertroys'; 'Ziggy Skalski'; 'pgsql-general@postgresql.org' Subject: RE: [GENERAL] pg_restore: custom archiver unexpected en

[GENERAL] Troubles with Postgresql performance

2014-06-18 Thread Denis Mironchuk
Hello. I had a strange issue with postgresql 9.3 server. Load on server rapidly increased, queries which took about 4ms were executed for 100ms and creation a foreign key on empty table blocked all queries to server. After server restart everithing became fine again, the same foreign key was create

Re: [GENERAL] pg_restore: custom archiver unexpected end of file , ERROR: missing data for column

2014-06-18 Thread Adrian Klaver
On 06/18/2014 04:05 AM, Khangelani Gama wrote: -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, June 18, 2014 4:32 AM To: Khangelani Gama; Andres Freund; Tom Lane Cc: Alban Hertroys; Ziggy Skalski; pgsql-general@postgresql.org Subject: Re: [GENERA

Re: [GENERAL] (Relatively) Oversized Checkpoint

2014-06-18 Thread Nathaniel Talbott
> What is the sustained volume of disk output you experience, for > example from vmstat snapshots? Unfortunately our metrics are... less than comprehensive at this point, so I don't have data for that at the moment. Going to work to rectify, but will take some time. > 10% of 8GB (which is sounds

Re: [GENERAL] pg_restore: custom archiver unexpected end of file , ERROR: missing data for column

2014-06-18 Thread Khangelani Gama
> Adrian you might be right I have just tried to pg_restore on the same > server(8.4.2), I get the same errors related to xml. Can someone > advise if the following XML file as an example is in the correct state or > not: The other strange thing is: ERROR: missing data for column "fpp_cde" CONTEX

Re: [GENERAL] Troubles with Postgresql performance

2014-06-18 Thread Kevin Grittner
Denis Mironchuk wrote: > Hello. I had a strange issue with postgresql 9.3 server. Load on > server rapidly increased, queries which took about 4ms were > executed for 100ms and creation a foreign key on empty table > blocked all queries to server. After server restart everithing > became fine aga

[GENERAL] Replacing a production db

2014-06-18 Thread Nicolás Lichtmaier
Is there a way to replace a production database with another as part of a new "release" of our website? Where I work we have a scheme of pushing code+db releases to "testing" and then to "production". Most of our databases use MySQL and I was told they can just rename the db and it works. We are a

Re: [GENERAL] Replacing a production db

2014-06-18 Thread Andrew Sullivan
On Wed, Jun 18, 2014 at 05:05:22PM -0300, Nicolás Lichtmaier wrote: > Where I work we have a scheme of pushing code+db releases to "testing" and > then to "production". Most of our databases use MySQL and I was told they > can just rename the db and it works. We are adopting PostgreSQL for some >

Re: [GENERAL] Replacing a production db

2014-06-18 Thread Bill Moran
On Wed, 18 Jun 2014 17:05:22 -0300 Nicolás Lichtmaier wrote: > Is there a way to replace a production database with another as part of a > new "release" of our website? > > Where I work we have a scheme of pushing code+db releases to "testing" and > then to "production". Most of our databases u

Re: [GENERAL] Replacing a production db

2014-06-18 Thread Nicolás Lichtmaier
I'm probably doing this wrong, but I couldn't find any resources to learn how to get this right. Can the renaming be done without disruption to current connections? From what I've read you have to disconnect everyone before renaming a database. 2014-06-18 17:47 GMT-03:00 Bill Moran : > On Wed,

Re: [GENERAL] Replacing a production db

2014-06-18 Thread Tim Clarke
On 18/06/14 21:50, Nicolás Lichtmaier wrote: > I'm probably doing this wrong, but I couldn't find any resources to > learn how to get this right. > > Can the renaming be done without disruption to current connections? > From what I've read you have to disconnect everyone before renaming a > databas

Re: [GENERAL] Replacing a production db

2014-06-18 Thread John R Pierce
On 6/18/2014 1:05 PM, Nicolás Lichtmaier wrote: Is there a way to replace a production database with another as part of a new "release" of our website? Where I work we have a scheme of pushing code+db releases to "testing" and then to "production". Most of our databases use MySQL and I was to

Re: [GENERAL] Replacing a production db

2014-06-18 Thread Andy Colson
On 6/18/2014 3:05 PM, Nicolás Lichtmaier wrote: Is there a way to replace a production database with another as part of a new "release" of our website? Where I work we have a scheme of pushing code+db releases to "testing" and then to "production". Most of our databases use MySQL and I was told

[GENERAL] Question about detecting database changes

2014-06-18 Thread Dave Peticolas
Hi, I have a question about getting some information about database changes. Let's suppose I have a particular transaction ID that I happen to know has been rolled back. Is it possible to ask the database if there have been any committed transactions subsequent to that rolled-back transaction? Ba

[GENERAL] Overlapping ranges

2014-06-18 Thread Jason Long
I have a large table of access logs to an application. I want is to find all rows that overlap startdate and enddate with any other rows. The query below seems to work, but does not finish unless I specify a single id. select distinct a1.id from t_access a1, t_access a2 where tstzr

Re: [GENERAL] Overlapping ranges

2014-06-18 Thread Rob Sargent
On 06/18/2014 05:47 PM, Jason Long wrote: I have a large table of access logs to an application. I want is to find all rows that overlap startdate and enddate with any other rows. The query below seems to work, but does not finish unless I specify a single id. select distinct a1.id from t_acce

Re: [GENERAL] Overlapping ranges

2014-06-18 Thread Jason Long
On Wed, 2014-06-18 at 18:08 -0600, Rob Sargent wrote: > On 06/18/2014 05:47 PM, Jason Long wrote: > > > > I have a large table of access logs to an application. > > > > I want is to find all rows that overlap startdate and enddate with any > > other rows. > > > > The query below seems to wo

[GENERAL] Global value/global variable?

2014-06-18 Thread Edson Richter
It is possible to define a global value/variable in PostgreSQL in a way that I can use it in any query/view/function?For example, I do have a connection string I use for dblink connections in several places (specially, inside views).Then, if I want to change the connection string, I do have to c

Re: [GENERAL] Global value/global variable?

2014-06-18 Thread Ian Barwick
On 19/06/14 11:50, Edson Richter wrote: It is possible to define a global value/variable in PostgreSQL in a way that I can use it in any query/view/function? For example, I do have a connection string I use for dblink connections in several places (specially, inside views). Then, if I want to c

Re: [GENERAL] Global value/global variable?

2014-06-18 Thread Tom Lane
Ian Barwick writes: > On 19/06/14 11:50, Edson Richter wrote: >> It is possible to define a global value/variable in PostgreSQL in a way that >> I can use it in any query/view/function? > There's no such thing as a global variable, but why not use a table > to store any global configuration valu

Re: [GENERAL] Overlapping ranges

2014-06-18 Thread Alban Hertroys
On 19 Jun 2014, at 1:47, Jason Long wrote: > I have a large table of access logs to an application. > > I want is to find all rows that overlap startdate and enddate with any > other rows. > > The query below seems to work, but does not finish unless I specify a > single id. > > select dis