[GENERAL] Backups

2009-11-08 Thread Bret
I need to back up a production database every night on FreeBSD 7.2, running Postgresql 8.3. Any good backup tips I should be aware of. Typically, I make a backup based on the current day, and rotate the seven days in the backup file name (eg; sat_backup, sun_backup etc). Thanks for all the

Re: [GENERAL] Backups

2009-11-08 Thread Uwe Schroeder
Personally I prefer multiple stages of backups off-site. So for my production webserver database, I have slony replicating the database to a different location. In addition I run full dumps every 12 hours which in turn I replicate using rdist to a remote system. That way, whatever happens, the

Re: [GENERAL] WAL shipping to two machines (PITR)

2009-11-08 Thread Tomas Simonaitis
We are using two slaves this way: - Active server moves WAL files to local directory, doesn't care about slaves (basically archive_command = 'mv %p /some/arch_dir/%f') - Slaves pull WAL files via rsync - Slaves also do full syncs every several hours (pg_start_backup / rsync / pg_stop_backup) -

[GENERAL] Problem to use remote cygwin server using ssh and native psql 8.3.5

2009-11-08 Thread Jukka Inkeri
I have installed cycwin and sshd in my Windows server. I have Winnative psql.exe (8.3.5) If I use cygwin locally in this server and give command in cygwin session: psql -h somehost -U someuser -d somedb it works fine But if i use via ssh same way, then no echo ... and process hang. I have

Re: [GENERAL] Problem to use remote cygwin server using ssh and native psql 8.3.5

2009-11-08 Thread Jukka Inkeri
Jukka Inkeri wrote: I have installed cycwin and sshd in my Windows server. I have Winnative psql.exe (8.3.5) If I use cygwin locally in this server and give command in cygwin session: psql -h somehost -U someuser -d somedb it works fine But if i use via ssh same way, then no echo ... and

[GENERAL] Getting iPhone Simulator App to compile with libpq on Snow Leopard

2009-11-08 Thread Bob Henkel
In my quest to create a simple PostgreSQL program that runs on the iPhone I have ran into some problems. The first issue I had with my build was libpq being compiled for architecture of type x86_64 by default on Snow Leopard and the Simulator being i386 so my build would fail telling me libpq was

Re: [GENERAL] adding a custom tsearch parser

2009-11-08 Thread Daniel Verite
ara.t.howard wrote: my questions are 1) can the current parser be configured in any way? 2) if not, can someone provide and direction towards writing my own and configuring pg to use it? http://www.postgresql.org/docs/current/static/test-parser.html Best regards, -- Daniel

Re: [GENERAL] Problem to use remote cygwin server using ssh and native psql 8.3.5

2009-11-08 Thread Sam Mason
On Sun, Nov 08, 2009 at 02:25:26PM +0200, Jukka Inkeri wrote: Jukka Inkeri wrote: tested using Cygwin 1.5.x and 1.7.x Ssh tty problem using Windows native psql.exe ? If I use flag -f in psql, then no problem. [...] Interactive work not. If I remember correctly it's to do with strange

[GENERAL] Problem granting access to a PlPython function

2009-11-08 Thread Mariano Mara
Hi, I have this plpython function that I need to execute with a non superuser. I logged in the postgres account, create it and grant execute rights to the target user. However I cannot execute it with this user: I'm getting a function ... does not exist error and after poking it for a few hours

Re: [GENERAL] Problem granting access to a PlPython function

2009-11-08 Thread Sam Mason
On Sun, Nov 08, 2009 at 05:07:16PM -0300, Mariano Mara wrote: I have this plpython function that I need to execute with a non superuser. I logged in the postgres account, create it and grant execute rights to the target user. However I cannot execute it with this user: I'm getting a function

Re: [GENERAL] Problem to use remote cygwin server using ssh and native psql 8.3.5

2009-11-08 Thread Magnus Hagander
On Sun, Nov 8, 2009 at 12:35, Jukka Inkeri p...@awot.fi wrote: I have installed cycwin and sshd in my Windows server. I have Winnative psql.exe (8.3.5) If I use cygwin locally in this server and give command in cygwin session:   psql -h somehost -U someuser -d somedb it works fine But if

Re: [GENERAL] Problem granting access to a PlPython function

2009-11-08 Thread Mariano Mara
Excerpts from Sam Mason's message of Sun Nov 08 17:18:52 -0300 2009: On Sun, Nov 08, 2009 at 05:07:16PM -0300, Mariano Mara wrote: I have this plpython function that I need to execute with a non superuser. I logged in the postgres account, create it and grant execute rights to the target

[GENERAL] I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

2009-11-08 Thread Tim Uckun
I want to accomplish what I would think would be a simple thing. I want the root user to be able to connect to the postgres database as user postgres from the local machine without passwords. Since I am doing this from a program I don't want to use the su facility. I have tried a lot of

Re: [GENERAL] [pgsql-es-ayuda] Ayuda con NOTIFY en C

2009-11-08 Thread Yadisnel Galvez Velazquez
Gracias Alvaro, mi pregunta era por si se podía implementar por uno mismo. El problema es que necesito comunicar una librería en C de un trigger con una aplicación que realiza réplica para que informe sobre cambios que se realizan en las tablas, esto lo he logrado mediante una implementación de

Re: [GENERAL] [pgsql-es-ayuda] Ayuda con NOTIFY en C

2009-11-08 Thread Alvaro Herrera
Yadisnel Galvez Velazquez wrote: Gracias Alvaro, mi pregunta era por si se podía implementar por uno mismo. El problema es que necesito comunicar una librería en C de un trigger con una aplicación que realiza réplica para que informe sobre cambios que se realizan en las tablas, esto lo he

Re: [GENERAL] I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

2009-11-08 Thread Tom Lane
Tim Uckun timuc...@gmail.com writes: I want to accomplish what I would think would be a simple thing. I want the root user to be able to connect to the postgres database as user postgres from the local machine without passwords. Since I am doing this from a program I don't want to use the su

[GENERAL] question about using pgmemcache

2009-11-08 Thread Juan Backson
Hi, I am planning to pgmemcache to act as a fast-accessible cache before my app and postgres. I have got it pgmemcache setup. The question I have is that if memcached crashes, and I need to restart memcached, since memcached is not persistent, do I need to run some scripts to auto-recreate all

Re: [GENERAL] question about using pgmemcache

2009-11-08 Thread Chris
Juan Backson wrote: Hi, I am planning to pgmemcache to act as a fast-accessible cache before my app and postgres. I have got it pgmemcache setup. The question I have is that if memcached crashes, and I need to restart memcached, since memcached is not persistent, do I need to run some

Re: [GENERAL] I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

2009-11-08 Thread Tim Uckun
I suspect you are expecting that the map will cause root to be logged in as postgres without asking for that.  It won't. What it will do is allow psql -U postgres and similar to work. That's exactly what I am looking to do. In my case I have a script that runs as root. I want to log in as

Re: [GENERAL] Problem to use remote cygwin server using ssh and native psql 8.3.5

2009-11-08 Thread Jukka Inkeri
The native psql is written for Windows, not for Cygwin. You really shouldn't be using it there... If you are using Cygwin, you should be using a Cygwin psql.exe. PG pages says: use native, not cygwin version anymore. It's not problem if it's windows binary, you can use many native binary

Re: [GENERAL] I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

2009-11-08 Thread Scott Marlowe
On Sun, Nov 8, 2009 at 9:08 PM, Tim Uckun timuc...@gmail.com wrote: I suspect you are expecting that the map will cause root to be logged in as postgres without asking for that.  It won't. What it will do is allow psql -U postgres and similar to work. That's exactly what I am looking to do.

Re: [GENERAL] I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

2009-11-08 Thread Tim Uckun
then say you're postgres in the script with the -U (if you're using psql) AS ROOT: psql -U postgres -h remote_db dbname Note that ident doesn't work so well between machines, so you might want to look at .pgpass That's what I am trying to get working. In actuality I am using ruby and

Re: [GENERAL] I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

2009-11-08 Thread John R Pierce
Tim Uckun wrote: psql -U postgres psql: FATAL: Ident authentication failed for user postgres Obviously I need to tell postgres to trust the user root when connected locally as postgres. How do I do that? either create a postgres user named 'root' and give it superuser privileges, or

[GENERAL] virtualidx exclusive lock

2009-11-08 Thread Uwe Schroeder
I've googled, but there's 0 hits. I have an issue with a ton of idle in transaction backends. What I noticed is when I look at pg_locks, pretty much all of the processes being idle in transaction have an exclusive lock of locktype virtualidx. Well, that doesn't make sense to me, but maybe