[GENERAL] Problem with pg_hba.conf?

2007-08-18 Thread Prasanna Mavinakuli
  Hello, All. We have compiled and installed postgreSQL 7.4.17 version on HP-UX without enabling ssl option. Rather we used most of the default option except lib/data directories and -enableThread safety. We are getting couple of problems during initdb and psql'ing. 1) $libdir in one of the

[GENERAL] Question on INDEX and SQL - stalling my database?

2007-08-18 Thread Rishi Daryanani
Hi all, I'm having problems with a query that's just stalling my database. If someone could help me out - I posted a forum topic on http://forums.devshed.com/postgresql-help-21/postgresql-new-index-pros-and-cons-467120.html There's just this one integer field, which when searched on, stalls my

Re: [GENERAL] Finding my database

2007-08-18 Thread Adrian Pitt
I have put v8.0 back on as you suggested, but so far it has made no difference. I am still unable to get the service restarted. When installing I changed the install to drive D, and also changed the data reference to the directory where I moved the data to. I unchecked the initialize database

[GENERAL] Partitioning

2007-08-18 Thread Julio Cesar Sánchez González
Hi guys, It's natural what master table in the partitioning table contain data (http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html) ? or to be empty. Thanks for all. -- Regards, Julio Cesar Sánchez González www.sistemasyconectividad.com.mx blog: http://darkavngr.blogspot.com

[GENERAL] Automating logins for mundane chores

2007-08-18 Thread Phoenix Kiula
I am writing some simple batch scripts to login to the DB and do a pg_dump. Also, when I login to do my own SQL tinkering, I'd like not to be asked for a password every time (which, for silly corporate reasons, is quite a convoluted one). So I read up on .pgpass. Where should this file be

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Magnus Hagander
Phoenix Kiula wrote: I am writing some simple batch scripts to login to the DB and do a pg_dump. Also, when I login to do my own SQL tinkering, I'd like not to be asked for a password every time (which, for silly corporate reasons, is quite a convoluted one). So I read up on .pgpass. Where

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Phoenix Kiula
On 18/08/07, Magnus Hagander [EMAIL PROTECTED] wrote: Phoenix Kiula wrote: I am writing some simple batch scripts to login to the DB and do a pg_dump. Also, when I login to do my own SQL tinkering, I'd like not to be asked for a password every time (which, for silly corporate reasons, is

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Magnus Hagander
Phoenix Kiula wrote: On 18/08/07, Magnus Hagander [EMAIL PROTECTED] wrote: Phoenix Kiula wrote: I am writing some simple batch scripts to login to the DB and do a pg_dump. Also, when I login to do my own SQL tinkering, I'd like not to be asked for a password every time (which, for silly

[GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Vance Maverick
I'm working on reading large BYTEA fields from PostgreSQL 8.1. (For legacy reasons, it's unattractive to move them to large objects.) I'm using JDBC, and as various people have pointed out http://archives.postgresql.org/pgsql-jdbc/2005-06/msg00138.php, the standard stream-style access method

Re: [GENERAL] Blobs in Postgresql

2007-08-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/17/07 23:16, Merlin Moncure wrote: On 8/18/07, Ron Olson [EMAIL PROTECTED] wrote: The language is Java. I've made some tests and they work very well for 25meg filesworks exactly the way it should, first time. MySQL had all kinds of nasty

Re: [GENERAL] Transactional DDL

2007-08-18 Thread Ron Mayer
Scott Marlowe wrote: On 8/14/07, Harpreet Dhaliwal [EMAIL PROTECTED] wrote: Hi, I read a few lines about SP compilation in postgres http://searchoracle.techtarget.com/originalContent/0,289142,sid41_gci1179016,00.html 1. stored procedure compilation is transactional. You can recompile a

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/17/07 21:45, Steve Manes wrote: Ron Johnson wrote: Moving all the application-bound inserts into stored procedures didn't achieve nearly the performance enhancement I'd assumed I'd get, which I figured was due to the overhead of the procs

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/18/07 06:02, Phoenix Kiula wrote: [snip] Thanks for this. I am logged in as root. Put it there and it works. I Well, that's your first problem. And second. And third. - -- Ron Johnson, Jr. Jefferson LA USA Give a man a fish, and he eats

Re: [GENERAL] Interpreting statistics collector output

2007-08-18 Thread Ron Mayer
Decibel! wrote: On Aug 15, 2007, at 2:11 PM, Gregory Stark wrote: Decibel! [EMAIL PROTECTED] writes: On Wed, Aug 15, 2007 at 01:26:02PM -0400, Steve Madsen wrote: On Aug 15, 2007, at 11:52 AM, Decibel! wrote: I can't really think of a case where a seqscan wouldn't return all the rows in the

Re: [GENERAL] Partitioning

2007-08-18 Thread Josh Tolley
On 8/18/07, Julio Cesar Sánchez González [EMAIL PROTECTED] wrote: Hi guys, It's natural what master table in the partitioning table contain data (http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html) ? or to be empty. I'm no partitioning expert, but I would say most of the

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Josh Tolley
On 8/18/07, Ron Johnson [EMAIL PROTECTED] wrote: Interesting. Does PG have to initiate the Perl interpreter every time you call a Perl-written SP? IIRC PostgreSQL should only load the perl interpreter once per session. - Josh ---(end of

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Josh Tolley wrote: On 8/18/07, Ron Johnson [EMAIL PROTECTED] wrote: Interesting. Does PG have to initiate the Perl interpreter every time you call a Perl-written SP? IIRC PostgreSQL should only load the perl interpreter once per session.

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Tom Lane
Vance Maverick [EMAIL PROTECTED] writes: My question is about performance in the postgres server. When I execute SELECT SUBSTRING (my_bytea FROM ? FOR ?) FROM my_table WHERE id =3D ?, does it fetch the whole BYTEA into memory? Or does it access only the pages that contain the requested

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/18/07 11:08, Joshua D. Drake wrote: Josh Tolley wrote: On 8/18/07, Ron Johnson [EMAIL PROTECTED] wrote: Interesting. Does PG have to initiate the Perl interpreter every time you call a Perl-written SP? IIRC PostgreSQL should only load the

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: Vance Maverick [EMAIL PROTECTED] writes: My question is about performance in the postgres server. When I execute SELECT SUBSTRING (my_bytea FROM ? FOR ?) FROM my_table WHERE id =3D ?, does it fetch the whole BYTEA into memory? Or

Re: [GENERAL] Finding my database

2007-08-18 Thread Raymond O'Donnell
On 18/08/2007 09:03, Adrian Pitt wrote: I have put v8.0 back on as you suggested, but so far it has made no difference. I am still unable to get the service restarted. When installing I changed the install to drive D, and also changed the data reference to the directory where I moved the data

Re: [GENERAL] language interface in postgresql

2007-08-18 Thread Ron Mayer
David Fetter wrote: Dollar-quoting is a cute technical solution to that, but you can't deny that it's simpler if you just restrict the function language to be SQL-ish so that CREATE FUNCTION can parse it without any interesting quoting rules. So sayeth Oracle and the SQL standards committee,

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Should we consider setting storage external by default for the type? No. That would be counterproductive for the more typical case of bytea values in the range of some-small-number-of-kilobytes. Or at least I think that's more typical than values that

Re: [GENERAL] Blobs in Postgresql

2007-08-18 Thread Shane Ambler
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/17/07 23:16, Merlin Moncure wrote: On 8/18/07, Ron Olson [EMAIL PROTECTED] wrote: The language is Java. I've made some tests and they work very well for 25meg filesworks exactly the way it should, first time. MySQL had

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: Joshua D. Drake [EMAIL PROTECTED] writes: Should we consider setting storage external by default for the type? No. That would be counterproductive for the more typical case of bytea values in the range of

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Karsten Hilbert
On Sat, Aug 18, 2007 at 12:20:42PM -0400, Tom Lane wrote: Vance Maverick [EMAIL PROTECTED] writes: My question is about performance in the postgres server. When I execute SELECT SUBSTRING (my_bytea FROM ? FOR ?) FROM my_table WHERE id =3D ?, does it fetch the whole BYTEA into memory? Or

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Karsten Hilbert wrote: On Sat, Aug 18, 2007 at 12:20:42PM -0400, Tom Lane wrote: Vance Maverick [EMAIL PROTECTED] writes: My question is about performance in the postgres server. When I execute SELECT SUBSTRING (my_bytea FROM ? FOR ?) FROM

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Karsten Hilbert
On Sat, Aug 18, 2007 at 12:49:09PM -0400, Tom Lane wrote: Joshua D. Drake [EMAIL PROTECTED] writes: Should we consider setting storage external by default for the type? No. That would be counterproductive for the more typical case of bytea values in the range of

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ron Johnson wrote: On 08/18/07 11:08, Joshua D. Drake wrote: Josh Tolley wrote: On 8/18/07, Ron Johnson [EMAIL PROTECTED] wrote: Interesting. Does PG have to initiate the Perl interpreter every time you call a Perl-written SP? IIRC PostgreSQL

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Tom Lane
Karsten Hilbert [EMAIL PROTECTED] writes: Would it be feasible to add an ALTER TABLE mode ... set storage externally-extended cutoff size ... where size is the user configurable size of the column data at which PostgreSQL switches from extended to external storage strategy ? Actually,

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Karsten Hilbert
On Sat, Aug 18, 2007 at 10:23:42AM -0700, Joshua D. Drake wrote: SET STORAGE EXTERNAL (before storing anything in it...) See the ALTER TABLE reference page. Now, to convert an existing bytea column I would need to add a new bytea column with set storage external, move the data from

[GENERAL] server closed the connection unexpectedly

2007-08-18 Thread Muhyiddin A.M Hayat
Dear all, i'm unable to connect postgres server with error : C:\Program Files\PostgreSQL\8.2\binpsql -U postgres siakad Password for user postgres: psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the

[GENERAL] server closed the connection unexpectedly

2007-08-18 Thread Muhyiddin A.M Hayat
Dear all, i'm unable to connect postgres server with error : C:\Program Files\PostgreSQL\8.2\binpsql -U postgres siakad Password for user postgres: psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the

Re: [GENERAL] server closed the connection unexpectedly

2007-08-18 Thread Raymond O'Donnell
On 18/08/2007 19:30, Muhyiddin A.M Hayat wrote: somebody help me please You'll need to post a lot more information before anyone can help. Is there anything in the server log? - or the Windows event log? Ray. --- Raymond

Re: [GENERAL] server closed the connection unexpectedly

2007-08-18 Thread Muhyiddin A.M Hayat
This is pg_log : 2007-08-19 03:00:50 LOG: database system was shut down at 2007-08-19 02:58:26 Malay Peninsula Standard Time 2007-08-19 03:00:50 LOG: checkpoint record is at 0/75A808 2007-08-19 03:00:50 LOG: redo record is at 0/75A808; undo record is at 0/0; shutdown TRUE 2007-08-19

[GENERAL] query large amount of data in c++ using libpq

2007-08-18 Thread Felix
Hi all, i am using PQexecParams() to SELECT about 3 million record in C++, and it takes several minutes to make it done with used memory dramatically incresed(about 200MB). it seems when i using PQexecParams(), i can't use the query result before all the data is sent to client. is there something

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Steve Manes
Ron Johnson wrote: Interesting. Does PG have to initiate the Perl interpreter every time you call a Perl-written SP? I mean the *application* language was Perl for both the inline insert and the proc call. The proc was written in plpgsql. ---(end of

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Gregory Stark
Joshua D. Drake [EMAIL PROTECTED] writes: Well this is a guess, but: Set existing column to storage external update existing column with existing data: UPDATE foo SET bar = bar; Well, not quite. That would actually reuse the toast pointer without decompressing it. We try to be clever

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Karsten Hilbert
On Sat, Aug 18, 2007 at 09:32:33PM +0100, Gregory Stark wrote: I do have to wonder how you're getting the data *in* though. If it's large enough to have to stream out like this then how do you initially load the data? Well, in my particular case it isn't so much that I *want* to access bytea

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Karsten Hilbert
On Sat, Aug 18, 2007 at 01:51:18PM -0400, Tom Lane wrote: Karsten Hilbert [EMAIL PROTECTED] writes: Would it be feasible to add an ALTER TABLE mode ... set storage externally-extended cutoff size ... where size is the user configurable size of the column data at which PostgreSQL

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Gregory Stark
Karsten Hilbert [EMAIL PROTECTED] writes: But maybe this can be nefariously interpreted such that I could sort-of implement cutoff-based extended/external switching by prepending alter table ... set storage external/extended ... to INSERTs/UPDATEs based on bytea parameter size. Or even

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Phoenix Kiula
On 18/08/07, Ron Johnson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/18/07 06:02, Phoenix Kiula wrote: [snip] Thanks for this. I am logged in as root. Put it there and it works. I Well, that's your first problem. And second. And third. Thanks for

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula wrote: On 18/08/07, Ron Johnson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/18/07 06:02, Phoenix Kiula wrote: [snip] Thanks for this. I am logged in as root. Put it there and it works. I Well,

Re: [GENERAL] Automating logins for mundane chores

2007-08-18 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/18/07 21:10, Phoenix Kiula wrote: On 18/08/07, Ron Johnson [EMAIL PROTECTED] wrote: On 08/18/07 06:02, Phoenix Kiula wrote: [snip] Thanks for this. I am logged in as root. Put it there and it works. I Well, that's your first problem. And

[GENERAL] Seeking datacenter PITR backup procedures [RESENDING]

2007-08-18 Thread Joey K.
Greetings, We have several web applications with Pg 8.2.x running on isolated servers (~25). The database size on each machines (du -h pgdata) is ~2 GB. We have been using nightly filesystem backup (stop pg, tar backup to ftp, start pg) and it worked well. We would like to move to PITR backups

Re: [GENERAL] Writing most code in Stored Procedures

2007-08-18 Thread Guy Rouillier
Ron Johnson wrote: So why is Perl-SP-INSERT so much slower than Perl-SQL-INSERT? (I can imagine that the SP code path would be longer, but since IO is the slowest part of the system, I'm surprised that it's *that* much slower.) I'm guessing that since PG allows overloaded SP names, the

[GENERAL] query large amount of data in c++ using libpq

2007-08-18 Thread Felix Ji
Hi all, i am using PQexecParams() to SELECT about 3 million record in C++, and it takes several minutes to make it done with used memory dramatically incresed(about 200MB). it seems when i using PQexecParams(), i can't use the query result before all the data is sent to client. is there something

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Vance Maverick
Karsten Hilbert writes: Well, in my particular case it isn't so much that I *want* to access bytea in chunks but rather that under certain not-yet-pinned-down circumstances windows clients tend to go out-or-memory on the socket during *retrieval* (insertion is fine, as is put/get access from