[GENERAL] Retrieve Future Timestamp Values

2011-10-07 Thread Adarsh Sharma
Dear all , I have these timestamp values in one table in a database. I need to fetch those rows are greater than the current time, fore.g today is Friday and i need rows of sunday, monday and so on . column A Column B "2011-10-07 09:32:51+05:30";"2011-1

Re: [GENERAL] How to create database link and synonym in postgresql 9.0

2011-10-07 Thread tushar nehete
Thank you very much Filip. I am also thinking on the same direction but I think I was missing something in syntax. I am using Postgres Plus Standard server9.0. For the database connection I have to give dblink_exec('dbname=db2','update...'); My next concern is about performance as

Re: [GENERAL] Retrieve Future Timestamp Values

2011-10-07 Thread Raymond O'Donnell
On 07/10/2011 08:13, Adarsh Sharma wrote: > Dear all , > > I have these timestamp values in one table in a database. > I need to fetch those rows are greater than the current time, fore.g > today is Friday and i need rows of sunday, monday and so on . > > column A

[GENERAL] Standby server witching into master role after import failure

2011-10-07 Thread Frank Lanitz
Hi folks, I've got an issue I'm currently investigating and I'm not 100 sure about the root cause. The setup is pretty easy: A standby server via PITR is importing WAL-files from master server. During this import it appears there has been an error which cause the standby to finish the importing an

[GENERAL] Can we use sqlcode in functions of plpgsql

2011-10-07 Thread tushar nehete
Hi, For backward compatibility and some other reasons we want to use SQLCODE in our functions of PLPGSQL. But in Postgres Server 9.0 it gives error for SQLCODE. Is there any way to use SQLCODE in functions of PLPGSQL at the place of SQLSTATE? Also what is the datatype of SQLSTATE?

Re: [GENERAL] Never-idle autovacuum, and does (auto)vacuuming fill the OS cache ?

2011-10-07 Thread Vincent de Phily
On Thursday 06 October 2011 12:09:30 Andrew Sullivan wrote: > On Thu, Oct 06, 2011 at 03:39:02PM +0200, Vincent de Phily wrote: > > In the case of vacuuming however, I think there's a point to be made > > about finishing fast when all vacuum workers are constantly busy : say > > the vacuum daemon n

Re: [GENERAL] Can we use sqlcode in functions of plpgsql

2011-10-07 Thread Pavel Stehule
Hello 2011/10/7 tushar nehete : > Hi, > For backward compatibility and some other reasons we want to use > SQLCODE in our functions of PLPGSQL. > But in Postgres Server 9.0 it gives error for SQLCODE. > Is there any way to use SQLCODE in functions of PLPGSQL at the place of > SQLSTATE? you can ha

Re: [GENERAL] In which case PG_VERSION file updates ?

2011-10-07 Thread Bruce Momjian
Scott Marlowe wrote: > On Sun, Sep 25, 2011 at 3:26 AM, Raghavendra > wrote: > > Thanks Adrian Klaver, > > Provided link gives about the information of what PG_VERSION file, which am > > aware of:) > > In my observation, all the object related OID's, _fsm, _vm files under > > $PGDATA/base/database

Re: [GENERAL] Never-idle autovacuum, and does (auto)vacuuming fill the OS cache ?

2011-10-07 Thread Cédric Villemain
2011/10/7 Vincent de Phily : > On Thursday 06 October 2011 12:09:30 Andrew Sullivan wrote: >> On Thu, Oct 06, 2011 at 03:39:02PM +0200, Vincent de Phily wrote: >> > In the case of vacuuming however, I think there's a point to be made >> > about finishing fast when all vacuum workers are constantly

Re: [GENERAL] Solaris 10u9, PG 8.4.6, 'c' lang function, fails on 1 of 5 servers

2011-10-07 Thread dennis jenkins
On Thu, Sep 29, 2011 at 12:08 PM, dennis jenkins < dennis.jenkins...@gmail.com> wrote: > > (root@failed: ) # psql -Upgsql -dmy_db -c"create or replace function > parse_micr(text) returns micr_struct > as '/db/pgsql_micr_parser_64.so', 'pgsql_micr_parser' language c volatile > cost 1;" > ERROR:

[GENERAL] Call For Talks: PGDay.SoCal @ SCALE 10X

2011-10-07 Thread Joe Conway
PGDay.SoCal is scheduled at this year's Southern California Linux Exposition (SCALE10X) held in the LAX Hilton Hotel in the city of Los Angeles, California, on Friday January 20th, 2012. We are looking for talks designed for a general audience of web developers, sysadmins, DBAs and open source use

Re: [GENERAL] Connection Pooling

2011-10-07 Thread Brandon Phelps
So we decided to go with pgpool-II. The documentation is a little lacking for pgpool-II so I have one question: How are connections handled once the default levels are reached? Here are my pgpool settings: num_init_children = 32 max_pool = 4 This creates 32 child processes when we start pgp

Re: [GENERAL] Connection Pooling

2011-10-07 Thread Guillaume Lelarge
On Fri, 2011-10-07 at 13:51 -0400, Brandon Phelps wrote: > So we decided to go with pgpool-II. The documentation is a little lacking > for pgpool-II so I have one question: > > How are connections handled once the default levels are reached? Here are my > pgpool settings: > > num_init_childre

[GENERAL] Failure controlling PG 9.1 service on Ubuntu 10.04 32-bit

2011-10-07 Thread Jack Christensen
Just upgraded a machine from PostgreSQL 9.0 to 9.1. I uninstalled the old version then installed the new one. Whenever I try to run a service command to start, stop, or restart the server it fails. jackc@lizard:~$ sudo service postgresql stop * Stopping PostgreSQL 9.1 database server * Erro

[GENERAL] select vs cursor/fetch speed disparity

2011-10-07 Thread Bosco Rama
Hi folks, I have a strange disparity between a query that is run as a straight select and the same query via a cursor. I hope I can jog someone's memory with the description as I have been unable to create a sanitized and/or reduced data set & schema that will reproduce this ... so far. :-( Runn

Re: [GENERAL] Connection Pooling

2011-10-07 Thread Brandon Phelps
Forgive me, I'm still a bit confused by how max_pool works with num_init_children. First you said that at most I can have 32 clients sending queries, but then you said that each process can handle 4 different connections... so does this mean that I can have 128 connections from pgpool to my p

Re: [GENERAL] Postgres 8.4: archive_timeout vs. checkpoint_timeout

2011-10-07 Thread Derrick Rice
On Thu, Oct 6, 2011 at 3:47 AM, Frank Lanitz wrote: > Hi folks, > > I want to refer to a question Rob did back in 2008 at > http://archives.postgresql.org/pgsql-general/2008-07/msg01167.php as we > are currently running into a similar question: > We are using warm standby via PITR using a shared

[GENERAL] Installation woes via Macports on Mac OS X 10.7

2011-10-07 Thread René Fournier
I've tried installation 8.4 and 9.0 on two different machines, and at the end can't start Postgresql. Here's the basic story: […] ---> Building postgresql90-server ---> Staging postgresql90-server into destroot ---> Creating launchd control script ##

Re: [GENERAL] Connection Pooling

2011-10-07 Thread Guillaume Lelarge
On Fri, 2011-10-07 at 15:45 -0400, Brandon Phelps wrote: > Forgive me, I'm still a bit confused by how max_pool works with > num_init_children. First you said that at most I can have 32 clients sending > queries, but then you said that each process can handle 4 different > connections... so doe

Re: [GENERAL] Installation woes via Macports on Mac OS X 10.7

2011-10-07 Thread Scott Ribe
On Oct 7, 2011, at 2:24 PM, René Fournier wrote: > I've tried installation 8.4 and 9.0 on two different machines, and at the end > can't start Postgresql. Here's the basic story: You can't change shmall & shmmax after boot. They must be set during startup. If you're on a recent version of OS X,

[GENERAL] How to add xml data to table

2011-10-07 Thread Andrus Moor
soap response below contains table of products, approx 5000 rows. Table of products (below) is nearly similar structure as xml data. Products table needs to be updated from xml data in every hour. How to add this xml data to table of products ? Should I use xpath() function or any other ides ? U

Re: [GENERAL] Installation woes via Macports on Mac OS X 10.7

2011-10-07 Thread René Fournier
Hi Scott, On 2011-10-07, at 2:57 PM, Scott Ribe wrote: > On Oct 7, 2011, at 2:24 PM, René Fournier wrote: > >> I've tried installation 8.4 and 9.0 on two different machines, and at the >> end can't start Postgresql. Here's the basic story: > > You can't change shmall & shmmax after boot. They

Re: [GENERAL] Installation woes via Macports on Mac OS X 10.7

2011-10-07 Thread Scott Ribe
On Oct 7, 2011, at 3:48 PM, René Fournier wrote: > Well, I changed them at the shell and in sysctl, and restarted (on both > machines). Check them at the shell. If they're not what you set in sysctl.conf, then your sysctl.conf is not correct, and since you can't change them after startup, you

[GENERAL] Getting PostGIS 1.5.3 working with Postgresql90 (Macports)

2011-10-07 Thread René Fournier
What I want to do is import some shape files, using the shp2pgsql loader. However, I need a database first, and I've read I need to make it spatially aware, which means creating it from the "template_postgis". All the docs I read indicate that template_postgis should be present after installing

Re: [GENERAL] Getting PostGIS 1.5.3 working with Postgresql90 (Macports)

2011-10-07 Thread Scott Ribe
On Oct 7, 2011, at 5:38 PM, René Fournier wrote: > (Sorry, I'm a MySQL guy. I'm just trying to get started without asking too > many dumb questions.) Frankly, I think you'd be better served by deleting the entirety of the macports stuff and installing postgresql from source the normal UNIX way:

Re: [GENERAL] Getting PostGIS 1.5.3 working with Postgresql90 (Macports)

2011-10-07 Thread René Fournier
Well, I would -- and I used to build a lot of stuff from source -- except there are a ton of other packages that Macports makes dead-simple to install. Plus, I find Macports makes it easy to automate a server build in one script. The problem as I see it isn't Macports but my unfamiliarity with P

Re: [GENERAL] Getting PostGIS 1.5.3 working with Postgresql90 (Macports)

2011-10-07 Thread Scott Ribe
On Oct 7, 2011, at 7:39 PM, René Fournier wrote: > Plus, I find Macports makes it easy to automate a server build in one script. > The problem as I see it isn't Macports but my unfamiliarity with Postgresql. I think it's both ;-) I tried macports for a couple of things and gave up on it. It wor

Re: [GENERAL] PostgreSQL consulting companies in the Bay Area

2011-10-07 Thread John DeSoi
On Oct 6, 2011, at 7:48 PM, Richard Price wrote: > Does anyone know any companies/individuals in the Bay Area who offer > PostgreSQL consulting services? Any tips or suggestions would be greatly > appreciated! > Looks like you have a few options here: http://www.postgresql.org/support/profes

Re: [GENERAL] Getting PostGIS 1.5.3 working with Postgresql90 (Macports)

2011-10-07 Thread René Fournier
On 2011-10-07, at 7:58 PM, Scott Ribe wrote: > On Oct 7, 2011, at 7:39 PM, René Fournier wrote: > >> Plus, I find Macports makes it easy to automate a server build in one >> script. The problem as I see it isn't Macports but my unfamiliarity with >> Postgresql. > > I think it's both ;-) I tri

Re: [GENERAL] select vs cursor/fetch speed disparity

2011-10-07 Thread Tom Lane
Bosco Rama writes: > I have a strange disparity between a query that is run as a > straight select and the same query via a cursor. I hope I can > jog someone's memory with the description as I have been unable > to create a sanitized and/or reduced data set & schema that will > reproduce this ..

Re: [GENERAL] Installation woes via Macports on Mac OS X 10.7

2011-10-07 Thread Tom Lane
=?iso-8859-1?Q?Ren=E9_Fournier?= writes: > I've tried installation 8.4 and 9.0 on two different machines, and at the end > can't start Postgresql. Here's the basic story: No, you started it all right, because it's there in the ps output: > Fri Oct 07 14:18:20 -- Baby-Irmo :: ps -ax | grep "post

Re: [GENERAL] Failure controlling PG 9.1 service on Ubuntu 10.04 32-bit

2011-10-07 Thread Craig Ringer
On 10/08/2011 02:23 AM, Jack Christensen wrote: Just upgraded a machine from PostgreSQL 9.0 to 9.1. I uninstalled the old version then installed the new one. Whenever I try to run a service command to start, stop, or restart the server it fails. jackc@lizard:~$ sudo service postgresql stop * St

Re: [GENERAL] Getting PostGIS 1.5.3 working with Postgresql90 (Macports)

2011-10-07 Thread Craig Ringer
On 10/08/2011 10:35 AM, René Fournier wrote: On 2011-10-07, at 7:58 PM, Scott Ribe wrote: On Oct 7, 2011, at 7:39 PM, René Fournier wrote: Plus, I find Macports makes it easy to automate a server build in one script. The problem as I see it isn't Macports but my unfamiliarity with Postgresq