[GENERAL] ERROR: permission denied for database control

2014-05-07 Thread Huang, Suya
Hi, I've encountered a weird problem in PostgreSQL : postgres= create user test password 'test'; postgres= grant select on pg_catalog.pg_database_size to test; postgres= grant execute on function pg_catalog.pg_database_size(name) to test; --login as user test postgres= select current_user;

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Leif Jensen
Hello Adrian, Thank you for your answer. I can post part of the code that makes these calls, but I'm not sure how much it would help. It is rather large function that makes these calls, and it is called all over the program. The part of the log posted is only a small excerpt of the use

Re: [GENERAL] ERROR: permission denied for database control

2014-05-07 Thread Albe Laurenz
Suya Huang wrote: I’ve encountered a weird problem in PostgreSQL : postgres= create user test password ‘test’; postgres= grant select on pg_catalog.pg_database_size to test; This statement produces an error: ERROR: relation pg_catalog.pg_database_size does not exist postgres= grant

Re: [GENERAL] Oracle to PostgreSQL replication

2014-05-07 Thread Albe Laurenz
Sameer Kumar wrote: I need to setup a replication process for continuously replicating changes happening in an Oracle Database to a PostgreSQL database. My Oracle Database is version 11.2 and setup as a cluster with RAC My Postgres database version is 9.2 Oracle Database is running in

Re: [GENERAL] Re: any psql \copy tricks for default-value columns without source data?

2014-05-07 Thread Rémi Cura
Hey, you may want to have a look at pg_bulkload ( http://pgbulkload.projects.pgfoundry.org/). Using filter you could get the function you want. Another solution is pgloader (http://pgloader.tapoueh.org) , but I don't know if it is as fast as copy. Cheers, Rémi-C 2014-05-06 23:04 GMT+02:00

Re: [GENERAL] Oracle to PostgreSQL replication

2014-05-07 Thread Geoff Montee
On Wed, May 7, 2014 at 12:31 AM, Sameer Kumar sameer.ku...@ashnik.comwrote: Hi, I need to setup a replication process for continuously replicating changes happening in an Oracle Database to a PostgreSQL database. My Oracle Database is version 11.2 and setup as a cluster with RAC My

Re: [GENERAL] Oracle to PostgreSQL replication

2014-05-07 Thread Serge Fonville
Hi, I need to setup a replication process for continuously replicating changes happening in an Oracle Database to a PostgreSQL database. My Oracle Database is version 11.2 and setup as a cluster with RAC My Postgres database version is 9.2 Oracle Database is running in Solaris and

Re: [GENERAL] Crosstab function

2014-05-07 Thread Sim Zacks
What I have done in the past to build a generic reporting application is to have the function write the results you want in a table and return the tablename and then have the client code call select * from that table. My standard report tablename is

[GENERAL] Re: any psql \copy tricks for default-value columns without source data?

2014-05-07 Thread David G Johnston
Thank you everyone; some good programs to check out but I just went ahead and used awk to add two additional columns of data to the input file before sending it onto psql. David J. -- View this message in context:

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Adrian Klaver
On 05/06/2014 11:37 PM, Leif Jensen wrote: Hello Adrian, Thank you for your answer. I can post part of the code that makes these calls, but I'm not sure how much it would help. It is rather large function that makes these calls, and it is called all over the program. The part of the

Re: [GENERAL] ERROR: permission denied for database control

2014-05-07 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: Suya Huang wrote: --fails if try to get all db size in one sql postgres= SELECT current_date,pg_database_size(pg_database.datname) from pg_database; ERROR: permission denied for database control It seems like you have a database called control

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Tom Lane
Leif Jensen l...@crysberg.dk writes: Thank you for your answer. I can post part of the code that makes these calls, but I'm not sure how much it would help. It is rather large function that makes these calls, and it is called all over the program. The part of the log posted is only a

[GENERAL] probable pg_hba.conf configuration issues

2014-05-07 Thread Ravi Roy
Hi, I'm sorry if this question have been asked earlier, but i could not find any valid result through googling. I'm running postgresql 9.1 on Windows 7 (64 bit) and i've following configuration in pg_hba.conf. host all superuser1127.0.0.1/32 password host all

Re: [GENERAL] probable pg_hba.conf configuration issues

2014-05-07 Thread Tom Lane
Ravi Roy ravi.a...@gmail.com writes: Using command line : psql -U superuser1 psql -U normaluser1 asks for password and login successfully. - perfect. (We are only alloing local connections, remote connections to database are disabled) But if I try to connect using pgadmin (from the same

Re: [GENERAL] probable pg_hba.conf configuration issues

2014-05-07 Thread Sim Zacks
My bet is you have either another line in the pg_hba that says trust or you saved the password and forgot. Sim On 05/07/2014 05:33 PM, Ravi Roy wrote: Hi,   I'm sorry if this question have been asked earlier,

Re: [GENERAL] probable pg_hba.conf configuration issues

2014-05-07 Thread David G Johnston
Ravi Roy wrote But if I try to connect using pgadmin (from the same machine) it gives acess to database without password, i'm surprised as it does not seem to respect pg_hba.conf or i'm terribly wrong in the configuration somewhere. You likely told pgadmin to remember (store) passwords. If

[GENERAL] Building Postgres using mingw

2014-05-07 Thread Michael Paquier
Hi all, Following some instructions on the wiki and the docs, I am trying to compile the code using minwg: https://wiki.postgresql.org/wiki/Building_With_MinGW http://www.postgresql.org/docs/devel/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW After installing mingw-w64 and

Re: [GENERAL] Building Postgres using mingw

2014-05-07 Thread Adrian Klaver
On 05/07/2014 08:27 AM, Michael Paquier wrote: Hi all, Following some instructions on the wiki and the docs, I am trying to compile the code using minwg: https://wiki.postgresql.org/wiki/Building_With_MinGW

[GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
After upgrading server to Postgres 9.3 in Debian customer cannot create backups anymore. pg_dump returns error lost synchronization with server: C:\myapp\..\pg_dump\pg_dump.exe -ib -Z3 -f C:\mybackup.backup -Fc -h 1.2.3.4 -U user -p 5432 mydb pg_dump: Dumping the contents of table attachme

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Tom Lane
Leif Jensen l...@crysberg.dk writes: Here is a gdb dump of the backtrace at the server process crash. I have also included the code that generates these calls. As mentioned below this specific connection has been used many times before the crash. Also, we are aware of the thread caveat

Re: [GENERAL] probable pg_hba.conf configuration issues

2014-05-07 Thread Ravi Roy
Thanks Sim, Tom David, i'm really amazed with quick answers and insight provided by you all. I found and was a password cache issue under %APPDATA%\postgresql\pgpass.conf; I removed it and everything works as expected. Thank you again guys! Regards, Ravi. On Wed, May 7, 2014 at 8:22 PM, David

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Tom Lane
Andrus kobrule...@hot.ee writes: pg_dump: Dumping the contents of table attachme failed: PQgetCopyData() failed. pg_dump: Error message from server: lost synchronization with server: got message type d, length 5858454 pg_dump: The command was: COPY firma1.attachme (id, idmailbox, attachname,

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Leif Jensen
Could it be related to the OFFSET part of the statement ? I have another query on the same table without OFFSET, which seems to work fine. Leif - Original Message - Leif Jensen l...@crysberg.dk writes: Here is a gdb dump of the backtrace at the server process crash. I

Re: [GENERAL] Building Postgres using mingw

2014-05-07 Thread Jeff Janes
On Wed, May 7, 2014 at 8:27 AM, Michael Paquier michael.paqu...@gmail.comwrote: Hi all, Following some instructions on the wiki and the docs, I am trying to compile the code using minwg: https://wiki.postgresql.org/wiki/Building_With_MinGW

Re: [GENERAL] Server process crash - Segmentation fault

2014-05-07 Thread Tom Lane
Leif Jensen l...@crysberg.dk writes: Could it be related to the OFFSET part of the statement ? I have another query on the same table without OFFSET, which seems to work fine. Yeah, the specific code path here involves executing a stable (or possibly immutable) SQL function in a LIMIT or

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
Hi! pg_dump: Error message from server: lost synchronization with server: got message type d, length 5858454 I think this is probably an out-of-memory situation inside pg_dump, ie libpq failing to make its input buffer large enough for the incoming row. It's hard to believe that there's not

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread David G Johnston
Andrus Moor wrote Dump worked for years without issues when server was 32 bit Windows 2003 server and Postgres and pg_dump were earlier version 9 (but after upgrade new rows are added to attachme table). How to create backup copies or diagnose the issue ? I can change pg_dump execution

Re: [GENERAL] Full text: Ispell dictionary

2014-05-07 Thread Oleg Bartunov
btw, take a look on contrib/dict_xsyn, it's more powerful than synonym dictionary. On Sat, May 3, 2014 at 2:26 AM, Tim van der Linden t...@shisaa.jp wrote: Hi Oleg Haha, understood! Thanks for helping me on this one. Cheers Tim On May 3, 2014 7:24:08 AM GMT+09:00, Oleg Bartunov

[GENERAL] Enforce Symmetric Matrix

2014-05-07 Thread Randy Westlund
I have a table with N (over 35k) rows. I need to compare each of those elements to every other element in the list, which is the handshake problem. This results in a symmetric matrix (an adjacency matrix for an undirected graph). Because all relations are symmetric, I only need to store the

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
Hi! Given this is an upgrade, though the specifics were omitted, is there some possibility of a pg_dump/server version mis-match being the cause. I could see where a 32-bit client connecting to a 64bit server could possible exhibit apparent memory-related issues. pg_dump is 32-bit version.

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Andrus
Hi! Given this is an upgrade, though the specifics were omitted, is there some possibility of a pg_dump/server version mis-match being the cause. I could see where a 32-bit client connecting to a 64bit server could possible exhibit apparent memory-related issues. pg_dump is 32-bit version.

Re: [GENERAL] How to fix lost synchronization with server

2014-05-07 Thread Tom Lane
Andrus kobrule...@hot.ee writes: Given this is an upgrade, though the specifics were omitted, is there some possibility of a pg_dump/server version mis-match being the cause. I could see where a 32-bit client connecting to a 64bit server could possible exhibit apparent memory-related issues.

Re: [GENERAL] ERROR: permission denied for database control

2014-05-07 Thread Huang, Suya
Thank you Tom and Albe. After grant connect database privilege to user test, the query runs without problem. Thanks, Suya -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Thursday, May 08, 2014 12:13 AM To: Albe Laurenz Cc: Huang, Suya; 'pgsql-general General'

Re: [GENERAL] Enforce Symmetric Matrix

2014-05-07 Thread David G Johnston
SELECT l.id, u.id, func(l.id, u.id) FROM ids l CROSS JOIN ids u WHERE l.id u.id Depending on whether you always update a known pair, or instead invalidate all rows where either id is a given value, you can use various means to manage the resultant materialized view. Triggers or interface

Re: [GENERAL] Building Postgres using mingw

2014-05-07 Thread Michael Paquier
On Wed, May 7, 2014 at 10:26 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Wed, May 7, 2014 at 8:27 AM, Michael Paquier michael.paqu...@gmail.com wrote: Hi all, Following some instructions on the wiki and the docs, I am trying to compile the code using minwg:

[GENERAL] Analyze against a table with geometry columns runs out of memory

2014-05-07 Thread Roxanne Reid-Bennett
Hello, We are working out the upgrade of our servers from Postgres 9.1 and Postgis 2.0 to Postgres 9.3 and Postgis 2.1 After building the base stack, The System Admin restored the database from a backup. [I'll ask for more details if you need them] I have 3 tables with geometry columns in

Re: [GENERAL] Oracle to PostgreSQL replication

2014-05-07 Thread Sameer Kumar
Thanks alot everyone! I guess I will be exploring more on oracle foreign data wrapper. Has anyone tried using oracle_fdw with Oracle RAC? I am wondering how would it handle failovers.