[GENERAL] Connection with server dropping out

2013-02-18 Thread Bastiaan Olij
Hi all, I'm hoping someone could help me with this issue, not sure if the general mailing list is the right place so apologies if this needs to be directed else where. We have several clients who are experiencing disconnects to our hosted postgres server. From the server side we simply see a "cou

[GENERAL] Connection with server dropping out

2013-02-18 Thread Bastiaan Olij
Hi all, I'm hoping someone could help me with this issue, not sure if the general mailing list is the right place so apologies if this needs to be directed else where. We have several clients who are experiencing disconnects to our hosted postgres server. From the server side we simply see a "cou

Re: [GENERAL] Streaming replication and sharding

2013-02-18 Thread Michael Paquier
On Tue, Feb 19, 2013 at 6:01 AM, René Romero Benavides wrote: > ** > > There's also one project called Postgres-XC which seems very promising, > but I'm kind of wary about its level of maturity. > Project page is here: https://sourceforge.net/projects/postgres-xc/ The latest version 1.0 released

Re: [GENERAL] could not link file "pg_xlog/xlogtemp.72606"

2013-02-18 Thread Claire McLister
Thanks. I checked and hard links are not supported by the NAS. Will look into getting another disk. Yes, should upgrade out of 8.3. Thanks again. Claire On Mon, 18 Feb 2013 08:21:19 -0800 Magnus Hagander wrote On Fri, Feb 15, 2013 at 6:25 PM, Claire McLis

[GENERAL] subselects vs WITH in views

2013-02-18 Thread Joe Van Dyk
My assumption was that WITH acted just like subselects, but apparently they don't? Using WITH doesn't use the expected index. (the below also at: https://gist.github.com/joevandyk/839413fac7b3bdd32cb3/raw/cec015d16bed7f4e20ab0101b58ae74a1df1cdc2/gistfile1.txt create view promotion_details1 as (

Re: [GENERAL] Why is this a cross join?

2013-02-18 Thread Kevin Grittner
Tim Uckun wrote: >> how do you want to determine which of the matching rows in the >> other table to choose, and which to ignore? > > Any of the matching rows will do but I just want one. Well, if you don't care, this might give you what you want. select distinct on (x.first6) crm.*, x.*   from

Re: [GENERAL] Why is this a cross join?

2013-02-18 Thread Tim Uckun
> for every row in one of the tables? If so, how do you want to > determine which of the matching rows in the other table to choose, > and which to ignore? In this case it's a simple lookup. Any of the matching rows will do but I just want one. -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] Streaming replication and sharding

2013-02-18 Thread René Romero Benavides
There's also one project called Postgres-XC which seems very promising, but I'm kind of wary about its level of maturity. On Monday, February 18, 2013 08:00:33 AM Albe Laurenz wrote: > Tiemo Kieft wrote: > > > We are developing an application that uses various web analytics packages > > (like Go

Re: [GENERAL] Streaming replication and sharding

2013-02-18 Thread René Romero Benavides
I'm also interested in leveraging something like that, these are my thoughts: - Have a master server with all the data - Have the data partitioned vertically (inheritance, exclusion constrains, etc) - One synchronous slave - N asynchronous slaves that feed from the synchronous slave (cascading r

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Seref Arikan
Hi Merlin, My plan is exactly what you've suggested, sending bytea to an external server. The networking library I'm using uses threads, and this is where I am creating threads. On Mon, Feb 18, 2013 at 3:56 PM, Merlin Moncure wrote: > On Mon, Feb 18, 2013 at 5:10 AM, Seref Arikan > wrote: > >

Re: [GENERAL] PG9.2.3. Query hanging: SELECT count(*) FROM pg_catalog.pg_class...

2013-02-18 Thread David Kerr
On Sat, Feb 16, 2013 at 10:30:44AM -0800, Kevin Grittner wrote: - David Kerr wrote: - - > Also, if anyone else stumbles upon this, it only seems to happen with jruby. - - > I have standard ruby programs where this does not occur. - - It sounds like it is at least possible that it is the issue I

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Atri Sharma
Sent from my iPad On 18-Feb-2013, at 23:39, Bruce Momjian wrote: > On Mon, Feb 18, 2013 at 11:25:44PM +0530, Atri Sharma wrote: >> Is there any way to locally synchronise the threads in my code,and >> send the requests to the PostgreSQL backend one at a time? Like a waiting >> queu

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Bruce Momjian
On Mon, Feb 18, 2013 at 11:25:44PM +0530, Atri Sharma wrote: > Is there any way to locally synchronise the threads in my code,and > send the requests to the PostgreSQL backend one at a time? Like a waiting > queue in my code? > >>> > >>> Is this from the client code? That is easy f

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Atri Sharma
Sent from my iPad On 18-Feb-2013, at 22:58, Bruce Momjian wrote: > On Mon, Feb 18, 2013 at 10:46:39PM +0530, Atri Sharma wrote: >> >> >> Sent from my iPad >> >> On 18-Feb-2013, at 22:38, Bruce Momjian wrote: >> >>> On Mon, Feb 18, 2013 at 10:33:26PM +0530, Atri Sharma wrote: >> While

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Bruce Momjian
On Mon, Feb 18, 2013 at 10:46:39PM +0530, Atri Sharma wrote: > > > Sent from my iPad > > On 18-Feb-2013, at 22:38, Bruce Momjian wrote: > > > On Mon, Feb 18, 2013 at 10:33:26PM +0530, Atri Sharma wrote: > While your threads are executing, your query can't be cancelled -- > only a har

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Atri Sharma
Sent from my iPad On 18-Feb-2013, at 22:38, Bruce Momjian wrote: > On Mon, Feb 18, 2013 at 10:33:26PM +0530, Atri Sharma wrote: While your threads are executing, your query can't be cancelled -- only a hard kill will take the database down. If you're ok with that risk, then go

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Bruce Momjian
On Mon, Feb 18, 2013 at 10:33:26PM +0530, Atri Sharma wrote: > >> While your threads are executing, your query can't be cancelled -- > >> only a hard kill will take the database down. If you're ok with that > >> risk, then go for it. If you're not, then I'd thinking about > >> sendinging the byte

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Atri Sharma
Sent from my iPad On 18-Feb-2013, at 22:27, Bruce Momjian wrote: > On Mon, Feb 18, 2013 at 09:56:22AM -0600, Merlin Moncure wrote: >> On Mon, Feb 18, 2013 at 5:10 AM, Seref Arikan >> wrote: >>> Greetings, >>> What would happen if I create multiple threads from within a postgresql >>> function

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Bruce Momjian
On Mon, Feb 18, 2013 at 09:56:22AM -0600, Merlin Moncure wrote: > On Mon, Feb 18, 2013 at 5:10 AM, Seref Arikan > wrote: > > Greetings, > > What would happen if I create multiple threads from within a postgresql > > function written in C? > > I have the opportunity to do parallel processing on bin

Re: [GENERAL] Why is this a cross join?

2013-02-18 Thread Kevin Grittner
Tim Uckun wrote: > I guess I am not explaining it properly.. > > Say I created new columns on both tables called "first_6" and > populated them with the substrings.  If I did a inner join or a > left join on those fields would I still get a cross join? > > inner join model_configurations mc on mc

Re: [GENERAL] could not link file "pg_xlog/xlogtemp.72606"

2013-02-18 Thread Magnus Hagander
On Fri, Feb 15, 2013 at 6:25 PM, Claire McLister wrote: > Hi there, > > We recently copied over our 8.3 database cluster files from a local disk to > a network attached storage drive. > > Everything seemed to work okay for a while until we got this error: > > ERROR: could not link file "pg_xlo

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Merlin Moncure
On Mon, Feb 18, 2013 at 5:10 AM, Seref Arikan wrote: > Greetings, > What would happen if I create multiple threads from within a postgresql > function written in C? > I have the opportunity to do parallel processing on binary data, and I need > to create multiple threads to do that. > If I can ens

Re: [GENERAL] Immutable functions, Exceptions and the Query Optimizer

2013-02-18 Thread Albe Laurenz
Cochise Ruhulessin wrote: > Regarding your question about what the CHECK constraint should achieve, I had > abstracted by use case > into Books/Book Types, which may have caused some vagueness. The actual use > case are the following > tables. [...] > CREATE TABLE persons( > person_id int8

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Seref Arikan
Thanks, You are right, it is not what I'm doing, I'm simply calling code that works on the binary blob using multiple threads. On Mon, Feb 18, 2013 at 3:02 PM, Bruce Momjian wrote: > On Mon, Feb 18, 2013 at 02:51:13PM +, Seref Arikan wrote: > > Thanks Bruce, > > I too think that it should b

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Bruce Momjian
On Mon, Feb 18, 2013 at 02:51:13PM +, Seref Arikan wrote: > Thanks Bruce, > I too think that it should be fine, as long as I make sure that the spawned > threads do not call back to originating thread and they are properly > terminated > once they're finished etc. > Various messages I've see

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Seref Arikan
Thanks Bruce, I too think that it should be fine, as long as I make sure that the spawned threads do not call back to originating thread and they are properly terminated once they're finished etc. Various messages I've seen in the list archives seem to mention that spawning threads is a bad idea, e

Re: [GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Bruce Momjian
On Mon, Feb 18, 2013 at 11:10:51AM +, Seref Arikan wrote: > Greetings, > What would happen if I create multiple threads from within a postgresql > function written in C? > I have the opportunity to do parallel processing on binary data, and I need to > create multiple threads to do that. > I

[GENERAL] What happens if I create new threads from within a postgresql function?

2013-02-18 Thread Seref Arikan
Greetings, What would happen if I create multiple threads from within a postgresql function written in C? I have the opportunity to do parallel processing on binary data, and I need to create multiple threads to do that. If I can ensure that all my threads complete their work before I exit my funct

Re: [GENERAL] Visual query builder for PosgreSQL?

2013-02-18 Thread Thomas Kellerer
Satoshi Nagayasu, 17.02.2013 17:42: I have never seen InstantSQL itself, but I had chances several times to go the RDB technical seminars here in Japan, where I have found that learning database technology is really exciting. :) So, I wish I will be able to work with RDB (and VMS) someday. :)

Re: [GENERAL] Streaming replication and sharding

2013-02-18 Thread Albe Laurenz
Tiemo Kieft wrote: > We are developing an application that uses various web analytics packages > (like Google Analytics) to > run analyses on. We are currently in closed beta stadium where we don't have > a lot of data in the > database, but at some point it will grow considerably. > > We basica