[GENERAL] How to do hot backup using postgres

2010-08-13 Thread tuanhoanganh
I tried to do pitr backup using Postgres 8.3.9 on windows. So I issued SELECT pg_start_backup('test'); After I put the db in backup mode I tried to zip the data directory files with 7z. However I encountered the following errors: The process cannot access the file because it is being used by anoth

Re: [GENERAL] Problem with dumps

2010-08-13 Thread Bill Christensen
At 9:55 AM +0200 8/11/10, Guillaume Lelarge wrote: Le 09/08/2010 20:04, Bill Christensen a écrit : Hi folks, I'm building a new server with postgres/phppgadmin, and having trouble getting the dumps to work properly. This is my first time installing postgres, so I very well may have missed

Re: [GENERAL] InitDB: Bad system call

2010-08-13 Thread Tom Lane
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= writes: > It's the same like before, but this time with core-file! :) I don't know > why, but now there is one. You can find it here: > http://www.dddbl.de/postgres.core (2,4 MB) That's good, but the core file is pretty much useless to anyone else. Please g

Re: [GENERAL] InitDB: Bad system call

2010-08-13 Thread Torsten Zühlsdorff
Hello Tom, How annoying :-(. I think what you need to do is use truss or strace or local equivalent with the follow-forks flag, so that you can see what the stand-alone backend process does, not just initdb itself. Ok, next round. I just have truss as an option, because strace didn't work at

Re: [GENERAL] log_statement / log_duration / log_min_duration_statement and SPI?

2010-08-13 Thread Jeff Davis
On Fri, 2010-08-13 at 09:56 -0700, Maciek Sakrejda wrote: > Hi, > > Is there any way to get log_min_duration_statement / log_statement / > log_duration to work with queries issued through SPI? If this is not > possible with a stock configuration, anyone of a patch that might be > floating out ther

[GENERAL] log_statement / log_duration / log_min_duration_statement and SPI?

2010-08-13 Thread Maciek Sakrejda
Hi, Is there any way to get log_min_duration_statement / log_statement / log_duration to work with queries issued through SPI? If this is not possible with a stock configuration, anyone of a patch that might be floating out there to add this? Thanks, --- Maciek Sakrejda | System Architect | Truvi

Re: [GENERAL] good exception handling archiecutre

2010-08-13 Thread Alban Hertroys
On 13 Aug 2010, at 14:07, wrote: > How can we do error logging in Postgres. I am trying to create a LOG_AND_STOP > method which would be generic to the code. I have pasted the code I have > written. This code returns no data which is understandable as the error is > thrown to the external wo

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Karl Denninger
Bruce Momjian wrote: > Craig Ringer wrote: > >> On 13/08/2010 9:31 PM, Bruce Momjian wrote: >> >>> Karl Denninger wrote: >>> I may be blind - I don't see a way to enable this. OpenSSL "kinda" supports this - does Postgres' SSL connectivity allow it to be supported/ena

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Joshua D. Drake
On Fri, 2010-08-13 at 11:38 -0400, Tom Lane wrote: > Craig Ringer writes: > > Overall: it sounds to me like SSL/TLS level compression would only be > > useful for native libpq-to-postgresql connections, and probably wouldn't > > be usable for non-libpq based database access drivers. It'd only wo

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Tom Lane
Craig Ringer writes: > Overall: it sounds to me like SSL/TLS level compression would only be > useful for native libpq-to-postgresql connections, and probably wouldn't > be usable for non-libpq based database access drivers. It'd only work if > SSL was configured, which is a limitation it'd be

Re: [GENERAL] ORM integration?

2010-08-13 Thread Peter Hunsberger
On Fri, Aug 13, 2010 at 1:52 AM, Craig Ringer wrote: >  I'm currently thinking that the upgraded LISTEN/NOTIFY mechanism >  in 9.0 might be a good channel for sending cache invalidation >  messages with. Thoughts? Ideas? > Forgot to comment on this. Since we've already got our cache management i

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Craig Ringer
On 13/08/2010 10:50 PM, Bruce Momjian wrote: I thought all SSL traffic was compressed, unless you turned that off. It is just SSH that is always compressed? Frankly, I thought all SSL traffic was compressed too, but the reading I've just been doing suggests otherwise. It looks like compressio

Re: [GENERAL] ORM integration?

2010-08-13 Thread Peter Hunsberger
On Fri, Aug 13, 2010 at 1:52 AM, Craig Ringer wrote: > Hi folks > > I know many people here loathe ORM systems. I'm one of them, but I still > use them when they appear to be appropriate, despite their problems. > > In the process I've come to realize that ORMs in general have a couple > of issues

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Craig Ringer
On 13/08/2010 10:43 PM, Craig Ringer wrote: OpenSSL does provide some transparent crypto support. See: http://www.openssl.org/docs/ssl/SSL_COMP_add_compression_method.html Some more info on this: Apache mod_ssl docs mention that SSLv3 handshake is required to negotiate compression in SSL. Th

Re: [GENERAL] Very bad plan when using VIEW and IN (SELECT...*)

2010-08-13 Thread Tom Lane
"Carlo Stonebanks" writes: >>> Having said that, modern versions of the planner seem to deal reasonably >>> well with this situation as long as they're being asked to push the >>> condition through a UNION ALL. Do you really need a UNION in that view? > This is PG v 8.3 - do you mean "modern" co

[GENERAL] How to add permissions to views?

2010-08-13 Thread Andre Lopes
Hi, I have developed a database system where every table have a view mapping the contents, so the users don't have direct access to the tables. For UPDATE and DELETE I have created RULES on the views. My question: I will create a user to give permissions to the views. I don't know what kind of p

Re: [GENERAL] Very bad plan when using VIEW and IN (SELECT...*)

2010-08-13 Thread Carlo Stonebanks
Taken from your advice, I gave this a try: SELECT * FROM mdx_core.vw_provider AS p WHERE provider_id = ANY array( SELECT provider_id FROM mdx_core.provider_alias LIMIT 10 ) Well, it RIPS through the query in 15ms compared to 13.0 secs for the In (SELECT...) >> Having said that, modern

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Bruce Momjian
Craig Ringer wrote: > On 13/08/2010 9:31 PM, Bruce Momjian wrote: > > Karl Denninger wrote: > >> I may be blind - I don't see a way to enable this. OpenSSL "kinda" > >> supports this - does Postgres' SSL connectivity allow it to be > >> supported/enabled? > > > > What are you asking, exactly? > >

Re: [GENERAL] Feature Request: bzip2 support in pg_dump, pg_restore

2010-08-13 Thread Tom Lane
Greg Smith writes: > Daniel Migowski wrote: >> A small investigation showed to me that bzip2 compressed sql files >> take only 60% of the space of gz compressed files. Since bzip2 is >> fairly common today, could one add an option to pg_dump and pg_restore >> supporting this compression type in

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Craig Ringer
On 13/08/2010 9:31 PM, Bruce Momjian wrote: Karl Denninger wrote: I may be blind - I don't see a way to enable this. OpenSSL "kinda" supports this - does Postgres' SSL connectivity allow it to be supported/enabled? What are you asking, exactly? As far as I can tell they're asking for transp

Re: [GENERAL] How to determine which tables are created from inheritance.

2010-08-13 Thread Chris Barnes
I have answered my own question. After some poking around I was able to find what I was looking for. I have posted for future reference. select relname,relid from pg_stat_user_tables where relid in (select inhrelid from pg_inherits) and relname like 'table%' order by relname; Thanks, Chris

[GENERAL] we test pgpool-II with Shared Sto rage (Active-Standby)..

2010-08-13 Thread 노현석
hi.. 1 # we test pgpool-II with Shared Storage (Active-Standby).. pgpool-II test(192.168.2.99) Active rac1 (192.168.2.61) Stadnby rac2 (192.168.2.71) 2 # we have question... 1>

Re: [GENERAL] Feature Request: bzip2 support in pg_dump, pg_restore

2010-08-13 Thread Greg Smith
Daniel Migowski wrote: A small investigation showed to me that bzip2 compressed sql files take only 60% of the space of gz compressed files. Since bzip2 is fairly common today, could one add an option to pg_dump and pg_restore supporting this compression type in their custom format? Or do the

Re: [GENERAL] Feature Request: bzip2 support in pg_dump, pg_restore

2010-08-13 Thread Scott Ribe
pg_dumpall | bzip2 > mydump.txt.bz2 bunzip2 -kc mydump.txt.bz2 | bin/psql template1 -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:

Re: [GENERAL] Compression on SSL links?

2010-08-13 Thread Bruce Momjian
Karl Denninger wrote: > I may be blind - I don't see a way to enable this. OpenSSL "kinda" > supports this - does Postgres' SSL connectivity allow it to be > supported/enabled? What are you asking, exactly? -- Bruce Momjian http://momjian.us EnterpriseDB

[GENERAL] How to determine which tables are created from inheritance.

2010-08-13 Thread Chris Barnes
I am using londiste and would like to add tables for partitioned tables only. I.E. exclude the parent. I am currently using the select below. What postgres catalog table would I query to see this information? psql database -t -c "select schemaname||'.'||relname from pg_stat_user_tables where

[GENERAL] good exception handling archiecutre

2010-08-13 Thread Atul.Goel
How can we do error logging in Postgres. I am trying to create a LOG_AND_STOP method which would be generic to the code. I have pasted the code I have written. This code returns no data which is understandable as the error is thrown to the external world. Can I write the code somehow. CREATE S

Re: [GENERAL] Feature Request: bzip2 support in pg_dump, pg_restore

2010-08-13 Thread Adrian von Bidder
Heyho! On Friday 13 August 2010 10.57:13 Daniel Migowski wrote: > A small investigation showed to me that bzip2 compressed sql files take > only 60% of the space of gz compressed files. But bzip2 is very slow. I think if there should be changes to the data compression, xz is probably the futur

Re: [GENERAL] ORM integration?

2010-08-13 Thread Adrian von Bidder
Heyho! On Friday 13 August 2010 08.52:30 Craig Ringer wrote: [ ... ORMs ... ] I wonder if it were worthwhile to collect information on various ORMs on the postgres wiki. Not to duplicate the ORM's documentation, but to show the most important highlights and pitfalls when using this or that ORM

[GENERAL] Feature Request: bzip2 support in pg_dump, pg_restore

2010-08-13 Thread Daniel Migowski
Hi, dear postgres developers, A small investigation showed to me that bzip2 compressed sql files take only 60% of the space of gz compressed files. Since bzip2 is fairly common today, could one add an option to pg_dump and pg_restore supporting this compression type in their custom format? Or

Re: [GENERAL] InitDB: Bad system call

2010-08-13 Thread Torsten Zühlsdorff
Hi Glen, How annoying :-(. I think what you need to do is use truss or strace or local equivalent with the follow-forks flag, so that you can see what the stand-alone backend process does, not just initdb itself. Ok, next round. I just have truss as an option, because strace didn't work at my

Re: [GENERAL] Setting up pgpass.conf for the postgres OS user on windows for pgAgent

2010-08-13 Thread Peter Geoghegan
> pgpass.conf file should in %APPDATA%\postgresql directory of user/account, > which you will use to start the pgagent. > > Suppose if you want start pgagent as user peter account on windows, then you > have to keep the pgpass.conf file in %APPDATA%\postgresql directory of peter > account. > > -

Re: [GENERAL] MySQL versus Postgres

2010-08-13 Thread Ivan Sergio Borgonovo
On Fri, 13 Aug 2010 14:17:17 +0800 Craig Ringer wrote: > On 13/08/10 08:38, Tatsuo Ishii wrote: > >> It's slower than smaller numbers, and if you actually dirty a > >> significant portion of it you can have a checkpoint that takes > >> hours to sync, completely trashing system responsiveness for

[GENERAL] ORM integration?

2010-08-13 Thread Craig Ringer
Hi folks I know many people here loathe ORM systems. I'm one of them, but I still use them when they appear to be appropriate, despite their problems. In the process I've come to realize that ORMs in general have a couple of issues that could be avoided with some help from the database. Specifica