[ADMIN][GENERAL] openvz and shared memory trouble

2014-03-28 Thread Willy-Bas Loos
Hi, I have a problem with postgres in combination with openvz. My hot standby crashes on me when i give it a normal value for shared_buffers (4GB, which 25% of the memory in the container). When i tune down the shared_buffers, it works again. But of course this is far from desireable. Now, i've

Re: [GENERAL] Oracle_FDW - Cache lookup failed

2014-03-28 Thread Albe Laurenz
Emanuel Araújo wrote: I have a problem wiht Oracle FDW 0.9.10 in PostgreSQL 9.3 I am using pg 9.3.4 Oracle FDW 0.9.10 Fedora 20 Client Oracle Release 11.2.0.3.0 Return Error: ERROR: cache lookup failed for type 0 This is a known bug, the fix is already committed:

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris or anyone who can help When I try this just below, it complains about foo (new table created in db2) , saying *ERROR: schema foo does not exist*. I got stuck on this error for a while now but still trying to see why but still no luck so far. If you have something please help

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Alban Hertroys
On 28 March 2014 11:07, Khangelani Gama kg...@argility.com wrote: Hi Chris or anyone who can help When I try this just below, it complains about foo (new table created in db2) , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Chris Curvey
On Fri, Mar 28, 2014 at 5:56 AM, Khangelani Gama kg...@argility.com wrote: Hi Chris or anyone who can help When I try this just below, it complains about foo , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but still no luck

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris I did replace foo and bar tables with my tables, in db2 I have table foo(the one to be updated) and the table bar(the one which has data I got from db1) *From:* ccur...@gmail.com [mailto:ccur...@gmail.com] *On Behalf Of *Chris Curvey *Sent:* Friday, March 28, 2014 1:50 PM *To:*

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Rémi Cura
Not sure, but maybe update foo set br_desc = bar.br_desc , br_active = bar.br_active (rest of columns) where br_cde = bar.br_cde; Anyway it seem sto be terribly bad idea to give those kind of names ! Cheers, Rémi-C

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Chris Curvey
I think the convention on this list is to bottom-post. On Fri, Mar 28, 2014 at 7:59 AM, Khangelani Gama kg...@argility.com wrote: Hi Chris I did replace foo and bar tables with my tables, in db2 I have table foo(the one to be updated) and the table bar(the one which has data I got from

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Thank you very much, I on my previous try I did not include the FROM. I will just do thoroughly checks before COMMIT. Thanks very much. *From:* ccur...@gmail.com [mailto:ccur...@gmail.com] *On Behalf Of *Chris Curvey *Sent:* Friday, March 28, 2014 2:38 PM *To:* Khangelani Gama *Cc:* pgsql

Re: [GENERAL] is there a way to dump the version of extensions

2014-03-28 Thread Michael Paquier
On Thu, Mar 27, 2014 at 7:11 PM, Manuel Kniep man...@adjust.com wrote: Hi, when doing a pg_dump on postgres 9.2 the resulting sql file only has CREATE EXTENSION extension_name; I would like to include the specific version of the extension to make sure that the correct version is

Re: [ADMIN][GENERAL] openvz and shared memory trouble

2014-03-28 Thread Adrian Klaver
On 03/28/2014 01:51 AM, Willy-Bas Loos wrote: Hi, I have a problem with postgres in combination with openvz. My hot standby crashes on me when i give it a normal value for shared_buffers (4GB, which 25% of the memory in the container). When i tune down the shared_buffers, it works again. But of

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris or anyone who can help When I try this just below, it complains about foo , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but still no luck so far. If you have something please help begin; update foo set br_desc

[GENERAL] The result of the last function call overwrites the result of previous function calls

2014-03-28 Thread Michael Ainsworth
Hello PostgreSQL community! I'm a big fan of PostgreSQL, but am new to the development side of things, so I apologise in advance if this email is not directed to the correct location. I have been working on an extension to PostgreSQL server to provide JSON support. This JSON support is

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris or anyone who can help When I try this just below, it complains about foo , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but still no luck so far. If you have something please help begin; update foo set br_desc

Re: [GENERAL] Help with exclusion constraint

2014-03-28 Thread Moshe Jacobson
On Fri, Mar 28, 2014 at 12:45 PM, hari.fu...@gmail.com wrote: I want to ensure that for any given value of fk_col that there is a maximum of one row with bool_col = true. This should be what you want: ALTER TABLE exclusion_example ADD CONSTRAINT ex EXCLUDE (fk_col WITH =) WHERE

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Markella Skempri
have you tried update foo set br_desc = bar.br_desc , br_active = bar.br_active (rest of columns) from bar where foo.br_cde = bar.br_cde; From: Khangelani Gama Sent: Friday, March 28, 2014 9:59 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Synchronizing a table that is in

Re: [GENERAL] Help with exclusion constraint

2014-03-28 Thread hari . fuchs
Moshe Jacobson mo...@neadwerx.com writes: Take the following table: CREATE TABLE exclusion_example AS ( pk_col integer primary key, fk_col integer not null references other_table, bool_col boolean not null ); I want to ensure that for any given value of fk_col that there

Re: [GENERAL] Help with exclusion constraint

2014-03-28 Thread Moshe Jacobson
On Fri, Mar 28, 2014 at 12:21 PM, Igor Neyman iney...@perceptron.comwrote: For this: any given value of fk_col that there is a maximum of one row with bool_col = true. why don't you (instead) create partial unique index: CREATE UNIQUE INDEX on exclusion_example(fk_col, bool_col) WHERE

[GENERAL] upgrading from debian 6 to 7--do in place or wipe-and-install?

2014-03-28 Thread Kevin Goess
We're looking at upgrading our database hosts running postgres 9.2 from debian 6/squeeze to debian 7/wheezy. It seems to me that using apt to upgrade in-place would be less work than wiping the boxes and reinstalling debian 7 from scratch, but the latter way would be cleaner. Does anybody have

[GENERAL] Help with exclusion constraint

2014-03-28 Thread Moshe Jacobson
Take the following table: CREATE TABLE exclusion_example AS ( pk_col integer primary key, fk_col integer not null references other_table, bool_col boolean not null ); I want to ensure that for any given value of fk_col that there is a maximum of one row with bool_col = true. I

Re: [GENERAL] The result of the last function call overwrites the result of previous function calls

2014-03-28 Thread Tom Lane
Michael Ainsworth michael.ainswo...@abri.une.edu.au writes: My question is: Can someone please enlighten me as to why the result of the last function call overwrites the results to the previous function calls? Sounds to me like your function is using a static area for its result, or something

Re: [GENERAL] Dead rows not getting removed during vacuum

2014-03-28 Thread Granthana Biswas
Thank you Tom. We will be upgrading soon. Regards, Granthana On Mon, Mar 24, 2014 at 7:28 PM, Tom Lane t...@sss.pgh.pa.us wrote: Granthana Biswas granth...@zedo.com writes: Version is PostgreSQL 9.1.4. You do realize you're missing almost two years' worth of bug fixes? The current

Re: [GENERAL] Help with exclusion constraint

2014-03-28 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Moshe Jacobson Sent: Friday, March 28, 2014 10:31 AM To: pgsql-general Subject: [GENERAL] Help with exclusion constraint Take the following table: CREATE TABLE exclusion_example AS ( pk_col

[GENERAL] what is sublinks in query planner?

2014-03-28 Thread Sandeep Gupta
Hi, I looked for description of sublinks in the code as well as online but failed to come with any information. Was wondering someone can provide a line or two of what sublinks are suppose to do? Thanks. Sandeep

Re: [GENERAL] what is sublinks in query planner?

2014-03-28 Thread Tom Lane
Sandeep Gupta gupta.sand...@gmail.com writes: I looked for description of sublinks in the code as well as online but failed to come with any information. Was wondering someone can provide a line or two of what sublinks are suppose to do? They're sub-SELECTs used in expression contexts (ie,

Re: [GENERAL] what is sublinks in query planner?

2014-03-28 Thread Sandeep Gupta
Hi Tom, Sure. Thanks for the info. This helps. I will look into primnodes.h as well. -Sandeep On Fri, Mar 28, 2014 at 3:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Sandeep Gupta gupta.sand...@gmail.com writes: I looked for description of sublinks in the code as well as online but

Re: [GENERAL] PG choosing nested loop for set membership?

2014-03-28 Thread Jeff Janes
On Tue, Mar 25, 2014 at 2:00 PM, Brian Crowell br...@fluggo.com wrote: Hello, it's me, a Postgres n00b again. I'm dealing with a query that scans a rather large table (94,000,000 tuples or so) and just picks out certain rows and sums them: select dci.snapshot_time as time,

Re: [GENERAL] EBCDIC conversion

2014-03-28 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/03/14 00:31, David W Noon wrote: I think the real issue is that you need icu or libiconv installed. You will also need to know which EBCDIC code page you want: U.S. EBCDIC is cp37, IIRC. I suspect you will need to write a C or Python