Re: [GENERAL] Cannot connect to remote postgres database

2013-07-03 Thread John R Pierce
On 7/3/2013 10:51 PM, Pavel Stehule wrote: 2013/7/4 Stephen Carville: >On 07/03/2013 01:27 PM, Andrew Sullivan wrote: >>Nothin' for nothin', but . . . >> >>On Wed, Jul 03, 2013 at 01:11:35PM -0700, Stephen Carville wrote: >>> >>>I have the software (v 8.4.13) installed on 64 bit Centos 6. It i

Re: [GENERAL] Feature Idea: Statement Echo in DO$$

2013-07-03 Thread Pavel Stehule
Hello 2013/7/3 David Johnston : > I am using a DO$$ $$ block to emulate something that admittedly may be > standard practice to accomplish using psql but for which I am using a less > capable UI. > > Anyway, the basic form is: > > DO $$ > DECLARE some_var varchar := 'value'; > BEGIN > > UPDATE ...

Re: [GENERAL] Cannot connect to remote postgres database

2013-07-03 Thread Pavel Stehule
2013/7/4 Stephen Carville : > On 07/03/2013 01:27 PM, Andrew Sullivan wrote: >> Nothin' for nothin', but . . . >> >> On Wed, Jul 03, 2013 at 01:11:35PM -0700, Stephen Carville wrote: >>> >>> I have the software (v 8.4.13) installed on 64 bit Centos 6. It is >> >> Why for a new project would you sel

Re: [GENERAL] (Default) Group permissions

2013-07-03 Thread Michael Orlitzky
On 07/02/2013 03:35 AM, Albe Laurenz wrote: > Michael Orlitzky wrote: >> I want to be able to create a database, set up the (default) group >> permissions, and have them work, even when a new user is added to one of >> the groups. Right now I don't know of a way to get default group >> permissions.

[GENERAL] async streaming and recovery_target_timeline=latest

2013-07-03 Thread Ben Chobot
We have an async streaming setup using 9.1.9 and 3 nodes - let's call them A, B, and C. A is the master, B and C are slaves. Today, A crashed, so we made B be the master and told C to follow along with the switch by changing the primary_conninfo in it's recovery.conf, making sure the history fil

Re: [GENERAL] Cannot connect to remote postgres database

2013-07-03 Thread Stephen Carville
On 07/03/2013 01:27 PM, Andrew Sullivan wrote: > Nothin' for nothin', but . . . > > On Wed, Jul 03, 2013 at 01:11:35PM -0700, Stephen Carville wrote: >> >> I have the software (v 8.4.13) installed on 64 bit Centos 6. It is > > Why for a new project would you select such an old release of the soft

Re: [GENERAL] Cannot connect to remote postgres database

2013-07-03 Thread Stephen Carville
On 07/03/2013 01:30 PM, Daniel Serodio (lists) wrote: > Stephen Carville wrote: >> I have been asked to evaluate Oracle, mysql and postgresql as a possible >> replacement for our existing Oracle and MsSQL databases. Oracle and >> mysql I pretty much have covered. Postgresql, OTOH, is somewhat less

Re: [GENERAL] Analyzing last run query in psql

2013-07-03 Thread Joe Van Dyk
I'd like the execution plan to be in the psql output, not in the postgres log. On Tue, Jul 2, 2013 at 11:20 PM, Andreas Kretschmer < akretsch...@spamfence.net> wrote: > Joe Van Dyk wrote: > > > I frequently need to analyze the last query in psql: > > select * from table where id = 1; > >

Re: [GENERAL] Analyzing last run query in psql

2013-07-03 Thread Joe Van Dyk
On Wed, Jul 3, 2013 at 6:43 AM, Oleg Bartunov wrote: > It was my dream to have something we already have in shell - > > explain analyze !$ > It would probably be: explain analyze !! (at least in bash syntax) Joe > > I think it should be not very difficult. > > Oleg > > On Tue, 2 Jul 2013, Jo

Re: [GENERAL] Memory usage after upgrade to 9.2.4

2013-07-03 Thread Daniel Cristian Cruz
I found where the problem is: http://www.postgresql.org/docs/9.1/static/release-9-1-6.html It could be nice if something is added to the 9.2 release notes to warn the admins. 2013/4/24 Adrian Klaver > On 04/24/2013 11:20 AM, Daniel Cristian Cruz wrote: > >> I've done an explain analyze under

Re: [GENERAL] Cannot connect to remote postgres database

2013-07-03 Thread Daniel Serodio (lists)
Stephen Carville wrote: I have been asked to evaluate Oracle, mysql and postgresql as a possible replacement for our existing Oracle and MsSQL databases. Oracle and mysql I pretty much have covered. Postgresql, OTOH, is somewhat less cooperative. I have the software (v 8.4.13) installed on 64 b

[GENERAL] Cannot connect to remote postgres database

2013-07-03 Thread Stephen Carville
I have been asked to evaluate Oracle, mysql and postgresql as a possible replacement for our existing Oracle and MsSQL databases. Oracle and mysql I pretty much have covered. Postgresql, OTOH, is somewhat less cooperative. I have the software (v 8.4.13) installed on 64 bit Centos 6. It is listeni

[GENERAL] Feature Idea: Statement Echo in DO$$

2013-07-03 Thread David Johnston
I am using a DO$$ $$ block to emulate something that admittedly may be standard practice to accomplish using psql but for which I am using a less capable UI. Anyway, the basic form is: DO $$ DECLARE some_var varchar := 'value'; BEGIN UPDATE . WHERE col = some_var; UPDATE . WHERE col = so

[GENERAL] odd locking behaviour

2013-07-03 Thread pg noob
Hi all, I am trying to understand some odd locking behaviour. I apologize in advance if this is a basic question and should be widely understood but I don't see it described in the documentation as far as I could find. I'm using Postgres 8.4.13 I have two tables, call them A & B for example purp

[GENERAL] AWS, cascading replication and WAL archiving

2013-07-03 Thread Daniel Serodio (lists)
I currently have a working 9.2 master + hot standby setup, using asynchronous replication and WAL archiving (via a shared NFS mount), running in our colocated datacenter. I need to migrate this to AWS, with as little downtime as possible. My plan is to create two cascading standbys, "daisy-cha

[GENERAL] Re: How to create a cursor that is independent of transactions and doesn't calculated when created ?

2013-07-03 Thread David Johnston
boraldomaster wrote > If there any possiblity to have a cursor that as fast as cursor without > hold and as transaction-independent as cursor with hold ? Depends... >From the documentation - the first source of potential understanding: http://www.postgresql.org/docs/9.0/interactive/sql-declare.h

[GENERAL] How to create a cursor that is independent of transactions and doesn't calculated when created ?

2013-07-03 Thread boraldomaster
I wonder how quick is cursor without hold. I have a data set with 10^7 rows. *begin; declare mycursor cursor for select * from z; commit; * - this takes 3 ms. *begin; declare mycursor cursor with hold for select * from z; commit; * - this takes 3 s. Thus, holdable cursor is getting calculate

[GENERAL] C User Defined Functions

2013-07-03 Thread Jake Silverman
Hey, I was trying to compile a user-defined function in C (I am trying to compile one of the examples given in chapter 35.9 of the 9.3beta2 documentation) using Microsoft Visual Studio Express 2012 on a 64-bit Windows 7 computer. I ran into the following error: C:\>cl /I "C:\postgres9.3beta2FI\i

[GENERAL] V8.4 TOAST table problem

2013-07-03 Thread Paul Tilles
Recently, I've had a PostgreSQL 8.2.11 server upgraded to 8.4 in order to take advantage of autovacuum features. This server exists in a very closed environment (isolated network, limited root privileges; this explains the older software in use) and runs on RHEL5.5 (i686). After the upgrade, th

Re: [GENERAL] pg_largeobject.sql script not run after upgrade

2013-07-03 Thread Stuart Ford
On 24/06/2013 19:20, "Bruce Momjian" wrote: >On Mon, Jun 24, 2013 at 06:03:40PM +, Stuart Ford wrote: >> >> Do you know if not running this script would explain the fact that our >> dump file sizes have been much smaller than expected? > >It might be possible if lack of pg_largeobject_meta

Re: [GENERAL] seq. DEFAULT values and rules

2013-07-03 Thread Tom Lane
salah jubeh writes: > Is this a bug ? No, it's a documented, operating-as-designed behavior. Rules are macros and therefore have all the usual multiple-evaluation-of-arguments hazards. If you just want to propagate data from one table to another, a trigger is often a better choice, or at least

[GENERAL] seq. DEFAULT values and rules

2013-07-03 Thread salah jubeh
Is this a bug ?,   the new.a_id in my opinion should not be replaced here with nextval () function but with the actual value returned by the sequence. Please have this minimal example . CREATE TABLE a (     a_id serial primary key ); CREATE TABLE b (     b_id serial Primary key ); CREATE

Re: [GENERAL] Analyzing last run query in psql

2013-07-03 Thread Oleg Bartunov
It was my dream to have something we already have in shell - explain analyze !$ I think it should be not very difficult. Oleg On Tue, 2 Jul 2013, Joe Van Dyk wrote: I frequently need to analyze the last query in psql: select * from table where id = 1; explain analyze select * from table

Re: [GENERAL] Analyzing last run query in psql

2013-07-03 Thread Luca Ferrari
On Wed, Jul 3, 2013 at 7:05 AM, Joe Van Dyk wrote: > I frequently need to analyze the last query in psql: > select * from table where id = 1; > explain analyze select * from table where id = 1; > > It would be nice to be able to do this: > explain analyze $LAST > > (or can I do somethi