[GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Thierry Hauchard
Hy, We can't upgrade our customers from 8.4 to 9.4.4 if they have a 32 bits server machine (Windows 2008, 2007...). There is no problem with PG 64 bits. When restoring from backup (created from 8.4 database with PG_Dump 9.4.4), the log shows errors about UTF like : 2015-07-07 17:03:35 CEST ER

Re: [GENERAL] [pg_hba.conf] publish own Python application using PostgreSQL

2015-07-08 Thread Karsten Hilbert
On Tue, Jul 07, 2015 at 06:57:45AM -0500, John McKown wrote: > >>> >at a bare minimum, a database administrator needs to create database > >>> >roles (users) and databases for an app like yours. > >>> > >> The admin don't need to create the db. It is done by the application > >> (sqlalchemy-utils

[GENERAL] Problem with ALTER TYPE, Indexes and cast

2015-07-08 Thread Marc Mamin
Hello, I plan to replace some btree indexes through btree_gin on some timed tables(e.g. monthly tables) For this, I first need to change the data type from character(n) to varchar, but I can't afford it on historical tables as this would be too time consuming, so only new tables should get the

Re: [GENERAL] [pg_hba.conf] publish own Python application using PostgreSQL

2015-07-08 Thread John McKown
On Wed, Jul 8, 2015 at 3:55 AM, Karsten Hilbert wrote: > On Tue, Jul 07, 2015 at 06:57:45AM -0500, John McKown wrote: > > > >>> >at a bare minimum, a database administrator needs to create database > > >>> >roles (users) and databases for an app like yours. > > >>> > > >> The admin don't need to

Re: [GENERAL] 9.4 on Ubuntu 15.04: ENETUNREACH error?

2015-07-08 Thread Adrian Klaver
On 07/07/2015 11:21 PM, Chas. Munat wrote: I recently upgraded to Ubuntu 15.04 with PostgreSQL 9.4.4 with uuids and plv8 coffeescript extensions. I can access the database via psql. My web application uses node.js via pg-bricks. It works perfectly on my Mac dev machine. The Mac has it's own dat

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Adrian Klaver
On 07/08/2015 01:04 AM, Thierry Hauchard wrote: Hy, We can't upgrade our customers from 8.4 to 9.4.4 if they have a 32 bits server machine (Windows 2008, 2007...). There is no problem with PG 64 bits. Except below you say only for majority of 64bit machines, so are the problems when they occu

Re: [GENERAL] 9.4 on Ubuntu 15.04: ENETUNREACH error?

2015-07-08 Thread Tom Lane
"Chas. Munat" writes: > I recently upgraded to Ubuntu 15.04 with PostgreSQL 9.4.4 with uuids and > plv8 coffeescript extensions. I can access the database via psql. My web > application uses node.js via pg-bricks. It works perfectly on my Mac dev > machine. > On the server, I get this error:

Re: [GENERAL] Problem with ALTER TYPE, Indexes and cast

2015-07-08 Thread Tom Lane
Marc Mamin writes: > Now I have generated queries that include cast information in order to ensure > that the indexes get used. > e.g.: WHERE month1.foo = cast('XY' as character(2)) > with mixed type, this should become something like: > SELECT ... FROM month1 > WHERE month1.foo = cast('XY'

Re: [GENERAL] Problem with ALTER TYPE, Indexes and cast

2015-07-08 Thread Marc Mamin
> -Original Message- > From: Tom Lane [mailto:t...@sss.pgh.pa.us] > Sent: Mittwoch, 8. Juli 2015 15:44 > To: Marc Mamin > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Problem with ALTER TYPE, Indexes and cast > > Marc Mamin writes: > > Now I have generated queries that incl

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Thierry Hauchard
There is NO problem on 64 bits machines with PG 64 bits. (We have not try PG 32 bits on 64 bits machine.) There IS problem on all 32 bits machine with PG 32 bits All databases are encoded on PG in UTF8 We set that on all connexions : SET CLIENT_ENCODING TO WIN1252; SET bytea_output TO escape; SE

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Adrian Klaver
On 07/08/2015 08:40 AM, Thierry Hauchard wrote: There is NO problem on 64 bits machines with PG 64 bits. I saw this line from your previous post: "No issue on 64bits machine (majority of our customers)." Realize now that this means the majority of your customers are using 64bit Windows. I re

[GENERAL] Dealing with bdr update/update conflicts

2015-07-08 Thread Giles Westwood
Hi all, I've been testing bdr over the last few days and trying to simulate conflicts. For an update/update conflict I powered down node a and updated on node b. Then powered down node b and updated node a and powered node b back on. The situation I'm left in is that replication happens one way

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Daniel Verite
Thierry Hauchard wrote: > When restoring from backup (created from 8.4 database with PG_Dump > 9.4.4), the log shows errors about UTF like : > 2015-07-07 17:03:35 CEST ERREUR: séquence d'octets invalide pour > l'encodage « UTF8 » : 0xf4 0x6c 0x65 0x20 [...] > UPDATE test_table SET str_f

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Adrian Klaver
On 07/08/2015 08:40 AM, Thierry Hauchard wrote: There is NO problem on 64 bits machines with PG 64 bits. (We have not try PG 32 bits on 64 bits machine.) There IS problem on all 32 bits machine with PG 32 bits Further thought, are the 32bit and 64bit Windows in the same version of Windows or d

Re: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Bob Lunney
Thierry, Please post the output of $ psql -l for the database in question for both the 32-bit and 64-bit servers. That will show what encoding was specified when the databases where created. Also, post the output of $ psql -c “show client_encoding” $ psql -c "show all" | grep lc_ s'il

[GENERAL] Re[2]: [GENERAL] PG 9.4.4 issue on French Windows 32 bits

2015-07-08 Thread Ivan Panchenko
Hi, which build of PosgreSQL did you use? Postgres Professional has published today its Windows PostgreSQL installer for 9.4.4, which solves some strange issues with russian encoding in psql occurring in the EDB build. I'm not sure it can help in your case. The installer is at http://postgres

[GENERAL] encrypt psql password in unix script

2015-07-08 Thread Suresh Raja
Hi: I cannot use .pgpass as the password stored here is not encrypted. can i use a encrypted password from unix shell script. has anybody ran into same situation. Wht options do i have. Thanks, -SR

Re: [GENERAL] encrypt psql password in unix script

2015-07-08 Thread John R Pierce
On 7/8/2015 11:34 AM, Suresh Raja wrote: I cannot use .pgpass as the password stored here is not encrypted. can i use a encrypted password from unix shell script. has anybody ran into same situation. Wht options do i have. I believe anywhere you enter a password in postgres, it can be the ha

Re: [GENERAL] [SQL] encrypt psql password in unix script

2015-07-08 Thread Steve Midgley
My suggestion is to put it in an environment variable and set that variable from a shell startup script that is secured with permissions. ( http://www.postgresql.org/docs/9.4/static/libpq-envars.html) If you can't do that, the only other method I've used is to setup Postgres with Ansible, and stor

Re: [GENERAL] encrypt psql password in unix script

2015-07-08 Thread Vick Khera
On Wed, Jul 8, 2015 at 2:46 PM, John R Pierce wrote: > but what security does that gain you?if someone gets your > encrypted/hashed password, he can still log on. the pgpass file has to be > permissions 700, so only YOU (and root) can read it. > Exactly this. If you want a script to authen

Re: [GENERAL] [SQL] encrypt psql password in unix script

2015-07-08 Thread Xavier Stevens
I use envcrypt for things like this locally. Just encrypt the file with your own PGP key. https://github.com/whilp/envcrypt On Wed, Jul 8, 2015 at 12:01 PM, Steve Midgley wrote: > My suggestion is to put it in an environment variable and set that > variable from a shell startup script that is s

[GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread Tim Clotworthy
Hello, I have a customer that is about to undertake a migration of an Oracle 11g database to PostgreSQL 9.x (exact version to be determined). I am talking not only of the migration of schemas and data, but also of a substantial codebase of Pl/SQL stored procedures, as well as many triggers. I don

Re: [GENERAL] [SQL] encrypt psql password in unix script

2015-07-08 Thread John R Pierce
On 7/8/2015 12:01 PM, Steve Midgley wrote: My suggestion is to put it in an environment variable and set that variable from a shell startup script that is secured with permissions. (http://www.postgresql.org/docs/9.4/static/libpq-envars.html) that just moves the problem, now the plaintext pa

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread Tim Clarke
This is almost exactly what we did around 8 years ago; obviously the version numbers have changed. The reason we chose Postgres was the enormous similarity between the two languages plus the overwhelming ROI on the migration; my CEO had a spontaneous nosebleed when the Oracle licensing costs were r

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread John McKown
On Wed, Jul 8, 2015 at 2:24 PM, Tim Clotworthy < tclotwor...@bluestonelogic.com> wrote: > Hello, > > I have a customer that is about to undertake a migration of an Oracle 11g > database to PostgreSQL 9.x (exact version to be determined). I am talking > not only of the migration of schemas and data

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread dinesh kumar
Hi, We recently done the similar migration for one of our customer. We used all opensource tools to achieve this migration process. We used Pentaho Data Integration tool for doing Online DB migration, which took minimal downtime with CDC{Change Data Capture} approach. Also, we used Ora2Pg tool to

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread John R Pierce
On 7/8/2015 1:16 PM, dinesh kumar wrote: We recently done the similar migration for one of our customer. We used all opensource tools to achieve this migration process. We used Pentaho Data Integration tool for doing Online DB migration, which took minimal downtime with CDC{Change Data Capture

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread CS DBA
On 07/08/2015 02:20 PM, John R Pierce wrote: > On 7/8/2015 1:16 PM, dinesh kumar wrote: >> We recently done the similar migration for one of our customer. We >> used all opensource tools to achieve this migration process. >> >> We used Pentaho Data Integration tool for doing Online DB migration,

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread dinesh kumar
On Wed, Jul 8, 2015 at 1:20 PM, John R Pierce wrote: > On 7/8/2015 1:16 PM, dinesh kumar wrote: > >> We recently done the similar migration for one of our customer. We used >> all opensource tools to achieve this migration process. >> >> We used Pentaho Data Integration tool for doing Online DB m

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread Joshua D. Drake
On 07/08/2015 12:47 PM, John McKown wrote: ​Why are they converting? Would EnterpriseDB (a commercial version of PostgreSQL which has extensions to make it a "drop in" replacement for Oracle) be a possibility? http://www.enterprisedb.com/solutions/oracle-compatibility-technology Because EDB

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread Melvin Davidson
I would start by looking at how many databases, schemas, tables and views are involved. Then look at how many individual Oracle functions need to be converted to plpgsql. You also need to investigate if there are any custom data types. I do not have the formula, but I am sure there is a general tim

Re: [GENERAL] Backup Method

2015-07-08 Thread Francisco Reyes
On 07/03/2015 08:08 AM, howardn...@selestial.com wrote: I am trying to move away from pg_dump as it is proving too slow. Have you looked into barman? http://www.pgbarman.org Also, another potential approach is to setup replication and to do the backups from the slave. -- Sent via pgsql-ge

[GENERAL] How to test SSL cert from CA?

2015-07-08 Thread Francisco Reyes
Have a client using a commercial application. For a year plus we had been using a local self signed certificate without issues. As of a few weeks ago a change/update to the program is making it complain about the self signed cert. I bought a SSL cert and installed it, but the program is still

Re: [GENERAL] How to test SSL cert from CA?

2015-07-08 Thread Tom Lane
Francisco Reyes writes: > Have a client using a commercial application. For a year plus we had > been using a local self signed certificate without issues. As of a few > weeks ago a change/update to the program is making it complain about the > self signed cert. What's the complaint exactly?

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread William Dunn
On Wed, Jul 8, 2015 at 5:20 PM, Joshua D. Drake wrote: > > On 07/08/2015 12:47 PM, John McKown wrote: > > >> ​Why are they converting? >> >> Would EnterpriseDB (a commercial version of PostgreSQL which has >> extensions to make it a "drop in" replacement for Oracle) be a >> possibility? >> http:

[GENERAL] Socket Connection Authentication

2015-07-08 Thread basti
Hello, I try to use PHP with Postgresq1 socket connection. All works fine with following entry in pg_hba.conf local database user trust or local database user peer map=someuser pg_ident.conf # MAPNAME SYSTEM-USERNAME PG-USERNAME someuserwww-data

Re: [GENERAL] Socket Connection Authentication

2015-07-08 Thread John R Pierce
On 7/8/2015 11:32 PM, basti wrote: When I try local database user md5 I get the error: "Peer authentication failed for user ..." Is it possible to authenticate a user with md5 via socket connection? yes, it is, I do it all the time. was this the first local line, or at least in front

Re: [GENERAL] Socket Connection Authentication

2015-07-08 Thread Naveed Shaikh
The peer authentication method works by obtaining the client's operating system user name from the kernel and using it as the allowed database user name (with optional user name mapping). This method is only supported on local connections. *Please check the below steps as an Example:* *1>>* Creat