Re: [GENERAL] securing the sql server ?

2011-08-23 Thread Condor
On Mon, 22 Aug 2011 14:20:00 -0400 (EDT), Gary Chambers wrote: so when this remote server reboots, where does the encryption key come from? Why, from a file that resides in /root on the server, of course! :-) That's secure, right? -- Gary Chambers Isn't necessary to be on the same server.

Re: [GENERAL] SSL certificates issue

2011-08-23 Thread Asia
Thank you for your reply. I agree that this configuration could be better and this is why I sent my post. There is still one concern remaining. As I said I have working configuration with libpq and jdbc. For jdbc I created keystore, that is properly used with connection ssl=on parameter and

Re: [GENERAL] SSL certificates issue

2011-08-23 Thread Giuseppe Sacco
Il giorno lun, 22/08/2011 alle 09.37 -0400, Tom Lane ha scritto: Asia asia123...@op.pl writes: Now the issue is then when using libpq it was enough to have only root certificate in server's root.crt and it worked fine. But when I tried using the same with JDBC it turned out that I need to

Re: [GENERAL] Getting value of bind variables

2011-08-23 Thread Martijn van Oosterhout
On Tue, Aug 23, 2011 at 09:07:20AM +0530, Jayadevan M wrote: I guess so. But when I tried the same query on psql by replacing ($4) with a value like '20110404', the query works OK. The value of $4 is being passed from a java application. So does this mean I have to change the data type in

[GENERAL] Wal archiving and streaming replication

2011-08-23 Thread alexondi
Hi! Do I need setup wal archiving (archiving_mode = on) setup when I use streaming replication? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Wal-archiving-and-streaming-replication-tp4726040p4726040.html Sent from the PostgreSQL - general mailing list archive at

[GENERAL] COPY FROM (query) in plpgsql

2011-08-23 Thread Marc Mamin
Hello, there seems to be no way to use COPY this way, so I guess this is a feature request... this may also help users who tried using COPY FROM STDIN in plpgsql. I have a query with a lot of string manipulation that returns data as single strings, e.g.: 'a,12,ght,45,1.2' 'b,13,ght,45,1.1'

Re: [GENERAL] Wal archiving and streaming replication

2011-08-23 Thread Ray Stell
On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote: Hi! Do I need setup wal archiving (archiving_mode = on) setup when I use streaming replication? yes http://www.postgresql.org/docs/current/interactive/high-availability.html -- Sent via pgsql-general mailing list

Re: [GENERAL] Wal archiving and streaming replication

2011-08-23 Thread Adrian Klaver
On Tuesday, August 23, 2011 4:14:15 am Ray Stell wrote: On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote: Hi! Do I need setup wal archiving (archiving_mode = on) setup when I use streaming replication? yes

Re: [GENERAL] Wal archiving and streaming replication

2011-08-23 Thread Ray Stell
On Tue, Aug 23, 2011 at 06:23:58AM -0700, Adrian Klaver wrote: On Tuesday, August 23, 2011 4:14:15 am Ray Stell wrote: On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote: Hi! Do I need setup wal archiving (archiving_mode = on) setup when I use streaming replication? yes

[GENERAL] GRANT privileges strange behavior

2011-08-23 Thread igivanoff
Hi, I have the following situation: postgres=# create database foo with encoding = 'UTF8'; postgres=# \c foo foo=# CREATE SCHEMA sc; foo=# ALTER DATABASE foo SET search_path=sc, pg_catalog; foo=# CREATE ROLE usr LOGIN PASSWORD 'usr' NOINHERIT CREATEDB VALID UNTIL 'infinity'; foo=# grant all

Re: [GENERAL] GRANT privileges strange behavior

2011-08-23 Thread Guillaume Lelarge
On Tue, 2011-08-23 at 06:43 -0700, igivanoff wrote: Hi, I have the following situation: postgres=# create database foo with encoding = 'UTF8'; postgres=# \c foo foo=# CREATE SCHEMA sc; foo=# ALTER DATABASE foo SET search_path=sc, pg_catalog; foo=# CREATE ROLE usr LOGIN PASSWORD 'usr'

Re: [GENERAL] COPY FROM (query) in plpgsql

2011-08-23 Thread Vincent Veyron
Le mardi 23 août 2011 à 11:29 +0200, Marc Mamin a écrit : Hello, there seems to be no way to use COPY this way, so I guess this is a feature request... this may also help users who tried using COPY FROM STDIN in plpgsql. I have a query with a lot of string manipulation that returns

Re: [GENERAL] Wal archiving and streaming replication

2011-08-23 Thread Raghavendra
On Tue, Aug 23, 2011 at 7:17 PM, Ray Stell ste...@cns.vt.edu wrote: On Tue, Aug 23, 2011 at 06:23:58AM -0700, Adrian Klaver wrote: On Tuesday, August 23, 2011 4:14:15 am Ray Stell wrote: On Tue, Aug 23, 2011 at 02:01:10AM -0700, alexondi wrote: Hi! Do I need setup wal archiving

[GENERAL] Executing more than one function.

2011-08-23 Thread f vf
Hello, I have a set of plsql functions that I want to execute. All these functions perform queries and insert data in the database and I need to execute them in order. What I have noticed is that if I execute this script BEGIN; SELECT function1(); COMMIT; BEGIN; SELECT function2(); COMMIT;

Re: [GENERAL] Executing more than one function.

2011-08-23 Thread Giuseppe Sacco
Il giorno mar, 23/08/2011 alle 16.30 +0100, f vf ha scritto: [...] it takes more time than if I execute one function at the time and sum the execution times of each one: BEGIN; SELECT functionX(); COMMIT; You should probably accout a time for the COMMIT operation. In one case you

Re: [GENERAL] Wal archiving and streaming replication

2011-08-23 Thread Ray Stell
On Tue, Aug 23, 2011 at 08:30:55PM +0530, Raghavendra wrote: Is it a best practice to keep cluster in Archive_mode = on and setup streaming replication or just leave archive_mode=off? Depends. The reason for creating WAL is in case they are needed for recovery. In the event that the stby

[GENERAL] View Caching - Is this Known and Expected Behavior?

2011-08-23 Thread David Johnston
Hey All, I am wondering whether the behavior I am observing is expected. The rough scenario I have setup goes as follows (I can likely put together a test script if that is warranted): version PostgreSQL 9.0.3 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5)

Re: [GENERAL] View Caching - Is this Known and Expected Behavior?

2011-08-23 Thread Tom Lane
David Johnston pol...@yahoo.com writes: I am wondering whether the behavior I am observing is expected. No, it isn't. Please provide a concrete test case. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] View Caching - Is this Known and Expected Behavior?

2011-08-23 Thread Merlin Moncure
On Tue, Aug 23, 2011 at 4:36 PM, David Johnston pol...@yahoo.com wrote: Hey All, I am wondering whether the behavior I am observing is expected.  The rough scenario I have setup goes as follows (I can likely put together a test script if that is warranted): version PostgreSQL 9.0.3 on

[GENERAL] JDBC Connection Errors

2011-08-23 Thread Sam Nelson
Hi list, A client is hitting an issue with JDBC: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. -pg_hba.conf is set to trust 0.0.0.0/0 (IPv4 only) -listen_addresses is * -I can find no

[GENERAL] documentation suggestion

2011-08-23 Thread Rob Sargent
Apologies if this is the wrong forum. If there has been a suggestion to get the Up hyperlink placed also at/near the top of the page, please add my vote. Else could this be considered as a feature request? rjs -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] View Caching - Is this Known and Expected Behavior?

2011-08-23 Thread David Johnston
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Tuesday, August 23, 2011 5:51 PM To: David Johnston Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] View Caching - Is this Known and Expected Behavior? David Johnston pol...@yahoo.com writes: I am wondering

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Dave Cramer
The only difference JDBC has over psql is that it has to connect via tcpip. Not sure about pgadmin. Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Tue, Aug 23, 2011 at 6:47 PM, Sam Nelson s...@consistentstate.com wrote: Hi list, A client is hitting an issue with

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Adrian Klaver
On Tuesday, August 23, 2011 3:47:33 pm Sam Nelson wrote: Hi list, A client is hitting an issue with JDBC: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. -pg_hba.conf is set to

[GENERAL] Collapsing multiple subqueries into one

2011-08-23 Thread Chris Hanks
I have two tables: CREATE TABLE items ( root_id integer NOT NULL, id serial NOT NULL, -- Other fields... CONSTRAINT items_pkey PRIMARY KEY (root_id, id) ) CREATE TABLE votes ( root_id integer NOT NULL, item_id integer NOT NULL, user_id integer NOT NULL, type smallint NOT NULL,

Re: [GENERAL] Wal archiving and streaming replication

2011-08-23 Thread Raghavendra
On Tue, Aug 23, 2011 at 10:49 PM, Ray Stell ste...@cns.vt.edu wrote: On Tue, Aug 23, 2011 at 08:30:55PM +0530, Raghavendra wrote: Is it a best practice to keep cluster in Archive_mode = on and setup streaming replication or just leave archive_mode=off? Depends. The reason for creating

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Adrian Klaver
On Tuesday, August 23, 2011 6:58:13 pm Sam Nelson wrote: Everything is remote. I thought of the IPv6 thing, but that seems unlikely - all connections are coming from the same system. The easy way to test is to throw in an IPv6 rule that matches the IPv4 rule into pg_hba.conf. Still,

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Sam Nelson
Everything is remote. I thought of the IPv6 thing, but that seems unlikely - all connections are coming from the same system. Still, we'll ask them and try to get some more details about things like that. --- === Samuel Nelson Consistent State www.consistentstate.com

Re: [GENERAL] Collapsing multiple subqueries into one

2011-08-23 Thread Royce Ausburn
This might help you: http://www.postgresql.org/docs/8.4/static/queries-with.html On 24/08/2011, at 9:54 AM, Chris Hanks wrote: I have two tables: CREATE TABLE items ( root_id integer NOT NULL, id serial NOT NULL, -- Other fields... CONSTRAINT items_pkey PRIMARY KEY (root_id, id)

Re: [GENERAL] documentation suggestion

2011-08-23 Thread Bruce Momjian
Rob Sargent wrote: Apologies if this is the wrong forum. If there has been a suggestion to get the Up hyperlink placed also at/near the top of the page, please add my vote. Else could this be considered as a feature request? I have talked to Peter Eisentraut on several occasions during the

Re: [GENERAL] Postgres on SSD

2011-08-23 Thread Ondrej Ivanič
Hi, On 12 August 2011 14:57, Greg Smith g...@2ndquadrant.com wrote: I'm about to evaluate this SSD card: FusionIO ioDrive Duo [1]. The main reason for this experiment is to see if SSD can significantly improve query performance The result is that FusionIO will help to our queries which was

Re: [GENERAL] documentation suggestion

2011-08-23 Thread Rob Sargent
Bruce Momjian wrote: Rob Sargent wrote: Apologies if this is the wrong forum. If there has been a suggestion to get the Up hyperlink placed also at/near the top of the page, please add my vote. Else could this be considered as a feature request? I have talked to Peter Eisentraut on