[GENERAL] Postgres and bambooinvoice

2014-01-22 Thread Harvey, Allan AC
Hi all, Was wondering if someone has experience with bommbooinvoice and postgres as the backend. Hoping for some off list help if the combination does actually work. Thanks Allan The material contained in this email is confidential and may be subject to legal privilege and/or copyright. Pleas

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-22 Thread Andrew Sullivan
On Thu, Jan 23, 2014 at 03:12:07AM +0400, Dmitry Koterov wrote: > for all the machines). At least MongoDB does the work well, and with almost > zero configuration. Mongo's data guarantees are, um, somewhat less robust than PostgreSQL's. Failover is easy if you don't have to be exactly right. A

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-22 Thread Dmitry Koterov
It's even more tricky if it's not well-covered by automated tests, I suppose. :-) There could be a number of methods to forbid the master to rise up from the grave, e.g. voting quorum (or the simplest, but less elegant, solution - a centralized "witness" daemon who does all the work for all the mac

Re: [GENERAL] pg_upgrade & tablespaces

2014-01-22 Thread Bruce Momjian
On Wed, Jan 22, 2014 at 04:33:47PM -0500, Joseph Kregloh wrote: > That is excellent news. I still have 3 more environments to upgrade, our > stage, > pre-prod, and production environments in the next month or so. I would be > willing to test any fix you may have. Thanks. I will let you know when

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-22 Thread John R Pierce
On 1/22/2014 1:35 PM, Dmitry Koterov wrote: So does something similar and more-or-less stable exist for PostgrSQL too? you'd need to implement that yourself using a cluster management package, and something like repmgr to handle the transitions. database failover is extremely tricky stuf

[GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-22 Thread Dmitry Koterov
Hello. I googled 1 hour approximately, but have not found a ready solution for this. So maybe this feature is in PostgreSQL todo-list, or something similar exists somewhere... Before the actual question, I'd like to give a small analogy. What I mostly love in MongoDB is that it supports a fully t

Re: [GENERAL] pg_upgrade & tablespaces

2014-01-22 Thread Joseph Kregloh
That is excellent news. I still have 3 more environments to upgrade, our stage, pre-prod, and production environments in the next month or so. I would be willing to test any fix you may have. -Joseph On Tue, Jan 21, 2014 at 7:02 PM, Bruce Momjian wrote: > On Mon, Jan 13, 2014 at 09:23:09AM -05

Re: [GENERAL] upsert functionality

2014-01-22 Thread John R Pierce
On 1/22/2014 10:21 AM, joocom wrote: Some days ago, i had to to implement an upsert and used a a/LOCK TABLE/ to prevent the race conditions. Working fine for the moment. http://www.joocom.de/blog/postgresql-insert-und-update-in-einem-statement/

Re: [GENERAL] upsert functionality

2014-01-22 Thread joocom
Some days ago, i had to to implement an upsert and used a a /LOCK TABLE/ to prevent the race conditions. Working fine for the moment. http://www.joocom.de/blog/postgresql-insert-und-update-in-einem-statement/ -- View

Re: [GENERAL] CREATE EXTENSION does not seem to work in 9.2

2014-01-22 Thread Adrian Klaver
On 01/22/2014 11:07 AM, Susan Cassidy wrote: It wasn't installed in the yum package that we used to install postgres 9.2. I had to add it. As I said, create language worked fine. Before I did create language, I got errors that the language didn't exist when I tried to create a function. After

Re: [GENERAL] question on writing a function

2014-01-22 Thread Moshe Jacobson
On Wed, Jan 22, 2014 at 12:08 PM, Merlin Moncure wrote: > What I would advise in this case is to organize deleted user IDs in a > deletion queue. You do that by making a 'users to be deleted table' > where you store the users pending deletion (which is the one and only > thing that happens at tr

Re: [GENERAL] 9.3.2 server creates hundreds of thousands of temporary files

2014-01-22 Thread Marti Raudsepp
On Wed, Jan 22, 2014 at 6:59 PM, Florian Weimer wrote: > This happens with postgresql-server-9.3.2-2.fc20.x86_64. > > I track this down to a lower-than-usual setting of work_mem, to 1MB, after > the upgrade to 9.3. > > With work_mem set to 8MB, the query completes in a reasonable time frame, > wit

Re: [GENERAL] CREATE EXTENSION does not seem to work in 9.2

2014-01-22 Thread Susan Cassidy
It wasn't installed in the yum package that we used to install postgres 9.2. I had to add it. As I said, create language worked fine. Before I did create language, I got errors that the language didn't exist when I tried to create a function. After I created the language, those errors went away

[GENERAL] Composite Foreign Key performance

2014-01-22 Thread Leonard Boyce
Apologies for the previous partial post earlier, fat-fingered today. If this is a repost I apologize in advance as I could not see my reply in the archive after a couple of hours. I currently have; - lookup table (lookup_id BYTEA PK, status TEXT, last_update TSTAMPTZ, ...) (PK index is > 20GB) -

Re: [GENERAL] 9.3.2 server creates hundreds of thousands of temporary files

2014-01-22 Thread Tom Lane
Florian Weimer writes: > I've got a query which causes PostgreSQL to create hundreds of thousands > of temporary files, many of them empty. The process also needs a lot of > memory. I suspect this is due to bookkeeping for those files. > The query looks like this: > [ huge hash join ] > I tr

[GENERAL] 9.3.2 server creates hundreds of thousands of temporary files

2014-01-22 Thread Florian Weimer
I've got a query which causes PostgreSQL to create hundreds of thousands of temporary files, many of them empty. The process also needs a lot of memory. I suspect this is due to bookkeeping for those files. The query looks like this: SELECT ef.arch::text, en.name, file_id, f.name FROM symb

Re: [GENERAL] question on writing a function

2014-01-22 Thread Merlin Moncure
On Wed, Jan 22, 2014 at 10:26 AM, Aaron Burnett wrote: > > Greetings all, > > I *think* there¹s a way to accomplish what I want, but it is eluding me at > this time. Any help or pointers will be greatly appreciated. > > What I am trying to accomplish is that when a member deactivates their > accou

Re: [GENERAL] question on writing a function

2014-01-22 Thread Adrian Klaver
On 01/22/2014 08:26 AM, Aaron Burnett wrote: Greetings all, I *think* there¹s a way to accomplish what I want, but it is eluding me at this time. Any help or pointers will be greatly appreciated. What I am trying to accomplish is that when a member deactivates their account through the UI, my

Re: [GENERAL] question on writing a function

2014-01-22 Thread Adrian Klaver
On 01/22/2014 08:26 AM, Aaron Burnett wrote: Greetings all, I *think* there¹s a way to accomplish what I want, but it is eluding me at this time. Any help or pointers will be greatly appreciated. What I am trying to accomplish is that when a member deactivates their account through the UI, my

[GENERAL] question on writing a function

2014-01-22 Thread Aaron Burnett
Greetings all, I *think* there¹s a way to accomplish what I want, but it is eluding me at this time. Any help or pointers will be greatly appreciated. What I am trying to accomplish is that when a member deactivates their account through the UI, my trigger will call a function that deletes or ar

Re: [GENERAL] composite foreign key performance

2014-01-22 Thread Leonard Boyce
Apologies for the previous partial post, fat-fingered today. I currently have; - lookup table (lookup_id BYTEA PK, status TEXT, last_update TSTAMPTZ, ...) (PK index is > 20GB) - data table (data_id BIGINT PK, customer_id BIGINT, lookup_id BYTEA, ...) which is partitioned by customer_id (there is

Re: [GENERAL] composite foreign key performance

2014-01-22 Thread Thomas Kellerer
Leonard Boyce, 22.01.2014 16:49: > We have an existing schema as follows; > lookup (id bytea PK, status text, .) > data A bytea as the PK? That sounds horrible. > Hoping I can get some advice here. What exactly is your question? -- Sent via pgsql-general mailing list (pgsql-general@p

[GENERAL] composite foreign key performance

2014-01-22 Thread Leonard Boyce
Hoping I can get some advice here. We have an existing schema as follows; lookup (id bytea PK, status text, .) data -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Frontend unexpectedly terminates connection

2014-01-22 Thread Mikhail Pryakhin
Hello guys! I'm a little bit confused with the following case. I've got a Postgressql server running on host A, and a java based client running on host B. The client uses org.postgresql.Driver JDBC driver (version 9.1-901.jdbc3). sometimes while executing long running stored procedure I get excep

Re: [GENERAL] pg_config problems on PG9.3/Centos?

2014-01-22 Thread Ken Tanzer
On Tue, Jan 21, 2014 at 11:49 PM, Devrim GÜNDÜZ wrote: > > Hi, > > On Tue, 2014-01-21 at 18:00 -0800, Ken Tanzer wrote: > > It didn't seem like a great idea to me either, but what's the better > > alternative? Without the symlink I get lots of errors: > > > > make USE_PGXS=1 > > make: pg_config: