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

2014-03-27 Thread Khangelani Gama
Thank you very much, I will try option 2 because option 1 will give me FK constrains. These two databases are not exactly similar, but few tables on each of these Databases needs to be exactly the same, in this case db1 is the reliable one, hence that's why I need to update db2 with what it's in d

Re: [GENERAL] EBCDIC conversion

2014-03-27 Thread David W Noon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27/03/14 19:08, Mike Blackwell wrote: > We have a need to check certain text fields to be sure they'll > convert properly to EBCDIC. A check constraint with a convert() > was the initial thought, but there doesn't seem to be a default > conversi

Re: [GENERAL] Trimming transaction logs after extended WAL archive failures

2014-03-27 Thread Steven Schlansker
On Mar 27, 2014, at 5:29 AM, Michael Paquier wrote: > On Thu, Mar 27, 2014 at 1:42 AM, Steven Schlansker > wrote: >> >> On Mar 25, 2014, at 7:58 PM, Adrian Klaver wrote: >>> Yea, vacuum just marks space as available for reuse it does not actually >>> free space. >>> >> >> I even kne

[GENERAL] Oracle_FDW - Cache lookup failed

2014-03-27 Thread Emanuel Araújo
Hi, 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 I am executing the simple query in most foreign tables.. Example wher tables with f_ are foreign t

[GENERAL] EBCDIC conversion

2014-03-27 Thread Mike Blackwell
We have a need to check certain text fields to be sure they'll convert properly to EBCDIC. A check constraint with a convert() was the initial thought, but there doesn't seem to be a default conversion from UTF8 to EBCDIC. Does anyone have an implementation they'd care to share, or suggestions on

Re: [GENERAL] To monitor the number of PostgreSQL database connections?

2014-03-27 Thread chiru r
And also you can monitor by scheduling below command in cron. It will collect the detailed data, so that we came to know where the connections are coming. [postgres@local~]$ crontab -l * * * * * /opt/postgres/9.3/bin/psql -Aqt -p 5493 -c "select * from pg_stat_activity;" >>/tmp/stats.csv On Th

Re: [GENERAL] Auditing Code - Fortify

2014-03-27 Thread Dev Kumkar
On Thu, Mar 27, 2014 at 7:11 PM, Adrian Klaver wrote: > Search on: > > fortify software database > > found: > > http://www.hpenterprisesecurity.com/vulncat/en/vulncat/index.html > > This indicates Postgres is not supported. > > > Search on > > fortify open source alternatives > > found: > > https:

Re: [GENERAL] To monitor the number of PostgreSQL database connections?

2014-03-27 Thread Merlin Moncure
On Wed, Mar 26, 2014 at 7:02 PM, David Johnston wrote: > Nithya Soman wrote >> Hi >> >> Could you please provide any method (query or any logfile) to check >> max connections happened during a time interval in psql DB ? > > Only if the time interval desired in basically zero-width (i.e., > instant

Re: [GENERAL] Auditing Code - Fortify

2014-03-27 Thread John R Pierce
On 3/27/2014 6:41 AM, Adrian Klaver wrote: http://www.hpenterprisesecurity.com/vulncat/en/vulncat/index.html This indicates Postgres is not supported. looking over what that tool *does* audit in the plsql and tsql that it supports is not very reassuring. -- john r pierce

Re: [GENERAL] Is it possible to "pip" pg_dump output into new db ?

2014-03-27 Thread Frank
Ray, Alan, thanks for your replies. We have tested the dump/restore procedure with a few smaller databases and it worked fine. We had a few smaller hiccups with the large database as it required a few modules and special tablespaces before it would start actually copying data. But not a real prob

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

2014-03-27 Thread Manuel Kniep
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 installed when loading the dump like CREATE EXTENSION extension_name VERSION vesion;

Re: [GENERAL] Auditing Code - Fortify

2014-03-27 Thread Adrian Klaver
On 03/27/2014 01:15 AM, Dev Kumkar wrote: On Thu, Mar 27, 2014 at 1:36 AM, Dev Kumkar mailto:devdas.kum...@gmail.com>> wrote: On Thu, Mar 27, 2014 at 1:31 AM, John R Pierce mailto:pie...@hogranch.com>> wrote: why don't you ask the Fortify vendor ? Yup, following up with them i

Re: [GENERAL] A guide about some topics of Associate Certification

2014-03-27 Thread Oscar Calderon
Ok! Now it's clear to me about what should i focus, thank you Albe and Jaime for your help. Regards. *** Oscar Calderon Analista de Sistemas Soluciones Aplicativas S.A de C.V www.solucionesaplicativas.com Cel.(503) 7741-7850 Tel.(503) 2522-2834 Sent from my Nexus 7 On Ma

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

2014-03-27 Thread Andrew Sullivan
Is there data in db2 that is not in db1, and ought not to be? If not, then I suggest dumping the table from db1, loading it into a different schema in db2, then moving the table in db2 out of the way and the new-table into place, all in one transaction. If you have data in db2 that is _not_ in db

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

2014-03-27 Thread Gauthier, Dave
In theory, you could write a script that opens both DBs, then systematically inserts or updates records in the destination DB table based on what's in the source DB table. Brute force, but automatable. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Beh

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

2014-03-27 Thread Chris Curvey
On Thu, Mar 27, 2014 at 6:16 AM, Khangelani Gama wrote: > Hi all > > > > Synchronizing a *table* that is in two different databases(e.g *db1 and > db2*). > > > > Please help me with this. I need to dump a table as INSERTS from db1 > (postgres 9.1.2) and change the INSERT statements into UPDATE st

Re: [GENERAL] Trimming transaction logs after extended WAL archive failures

2014-03-27 Thread Michael Paquier
On Thu, Mar 27, 2014 at 1:42 AM, Steven Schlansker wrote: > > On Mar 25, 2014, at 7:58 PM, Adrian Klaver wrote: > >> On 03/25/2014 04:52 PM, Steven Schlansker wrote: >>> >> Some more questions, what happens when things begin to dawn on me:) You said the disk filled up entirely with

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

2014-03-27 Thread Khangelani Gama
Thanks but I did look at the examples in http://www.the-art-of-web.com/sql/upsert/ before I sent out an email but I could not apply it in my case. I need a broader clue for my case. Like each UPDATE statement should update each column for each *br_cde* (primary key) for this *table* . *From:

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

2014-03-27 Thread Rémi Cura
Hey, it seems to be a very classical problem call "upsert" You'll find a lot of answer on hte web, See for example http://www.the-art-of-web.com/sql/upsert/ Cheers, Rémi-C 2014-03-27 11:16 GMT+01:00 Khangelani Gama : > Hi all > > > > Synchronizing a *table* that is in two different databases(e

Re: [GENERAL] A guide about some topics of Associate Certification

2014-03-27 Thread jaime soler
On mar, 2014-03-25 at 17:50 -0600, Oscar Calderon wrote: Hi Oscar, I've taked the enterprisedb trainings. > Everybody have a nice day. Well, finally the place where i currently > work paid me a chance to take the Associate Certification exam and i'm > reviewing some topics, specifically the top

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

2014-03-27 Thread Khangelani Gama
Hi all Synchronizing a *table* that is in two different databases(e.g *db1 and db2*). Please help me with this. I need to dump a table as INSERTS from db1 (postgres 9.1.2) and change the INSERT statements into UPDATE statements in order to apply that change in *db2(postgres 8.3.0.112)* which

Re: [GENERAL] Auditing Code - Fortify

2014-03-27 Thread Dev Kumkar
On Thu, Mar 27, 2014 at 1:36 AM, Dev Kumkar wrote: > On Thu, Mar 27, 2014 at 1:31 AM, John R Pierce wrote: > >> why don't you ask the Fortify vendor ? > > > Yup, following up with them in parallel. > Search didn't gave me any good links, so wanted to check with community > too here. > > If not Fo