Re: [ADMIN] client for solaris
On Friday 13 December 2002 00:52, Aravind Vinnakota wrote: > Hi all, > I am looking for a postgreSQL client (okay with command line client) for > installing on a Solaris 8 machine. The basic idea is to use the client and > retreive the data from a database running on another machine. So, I want > to know where I can get the client (url) for solaris? I dont want all the > source, only the source of client. I am assuming postgreSQL will run on > solaris. I can make a package from the source. By client, I mean the > client libraries. You will have to download the entire PostgreSQL source; the smallest available package is "postgresql-base-x.x.tar.gz" which doesn't include the docs. etc. This page: http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/install-procedure.html contains info on installing the standard client apps without the server. Ian Barwick [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [ADMIN] Applictaion data Logging
On Thursday 12 December 2002 01:35 am, Jesus Sandoval wrote: > 3) In my design of data logging, I only have one "logging table" for all > the application, but this logging table has to have the table name and the > column name of what is being changed, inserted or deteled, like the > following: > > id SERIAL-- Primary key > tablename VARCHAR(40)-- Table name that changed > fieldname VARCHAR(40)-- fieldname that changed in the table > user VARCHAR(16)-- User that made the change > timedate TIMESTAMP WITHOUT TIME ZONE-- Timestamp of change > keyvalue TEXT-- The key value of the record that changed > oldcontent TEXT-- the field's content before the change > newcontent TEXT-- the field's new content > > I'm not sure if the primary key (id SERIAL) is used in the way you > suggested the serial number??? no. In your example, you're using SERIAL as a dbms-generated object-ID whereas the "serial" I meant (think of it as a "version-number") is an integer that gets incremented each time the tuple is modified. > 4) What utility can have storing the serial number in the data table for portability reasons you should do that at the OR-level, i.e. in your doUpdate(). Again for portability I would suggest not to use the "SERIAL"-type for "id". The same functionality can be achieved via an extra table that holds the last valid object-ID. Whenever the mapper needs to create a new object, it simply increments the number in that table, sets it as the id in the new object (and the serial resp. version to 1) and inserts the record (in a transaction, of course). Nice side-effect: the object id will be unique among _all_ tables which can be used for other purposes as well. > Another design that I'm aware, every time somebody updated the tuple, a new > tuple where written to the table with a timestamp, so if I wanted to know > the actual value I just get the record with the greatest timestamp, this design doesn't work well with some dbms (slow joins) > and if > I wanted to know the history I can see all the tuples with the same ke > value (not the primary key, because in this design, the primary key always > was a SERIAL value). I see 2 probs with this design: - there is one logging record for each modified field in a tuple, i.e. if 20 fields were modified, you generate 20 records! - the original datatype is lost. Well, it depends on your demands. Harald. (btw.: is this the proper list for this thread? ;-) ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[ADMIN] Database Server is too Slow
Hi! I need help, i mounted a Postgresql server on IBM netserver with RAID 5 134 GB, 2.5 GB de RAM and two Xeon 1.4 ghz. I installed postgresql 7.3 in this box, my database have over 25 millons of records, and everything is slow. i optimized with indexes,vacuum analyze and tuning up the kernel for shared memory usage. but the server is too slow when: - create index for any table with more than 5 millions - vacuum takes over four hours in this type of tables. - select max (field) from table where field2= takes a lot of time. explain select max(numoble) from obligacion where periodo=200100; QUERY PLAN - Aggregate (cost=6160676.57..6160676.57 rows=1 width=16) -> Index Scan using obligacion8 on obligacion (cost=0.00..6156384.72 rows=1716743 width=16) Index Cond: (periodo = 200100::numeric) (3 rows) please, i need help about this, i read a lot of documantation for tune up a postgresql server and still having problems. anybody have a similar problem? how to solve it??? thanks in advance.
Re: [ADMIN] how to cancel a query ?
I was asking on the pyPgSQL list whether the PQrequestCancel() would allow that if a user submitting queries from Python closed the Python shell, the query would be cancelled (a la ^C in psql). This led me to: If the connection from which a synchronous query ("libpq->connection.query()") was submitted is closed, should libpq assume a PQrequesCancel() and cancel the query at the same time? Isn't this the analog of ^C in psql? Thanks, Murthy -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 14:19 To: [EMAIL PROTECTED] Cc: Tom Lane; [EMAIL PROTECTED] Subject: Re: [ADMIN] how to cancel a query ? Andreas Schmitz wrote: > On Wednesday 04 December 2002 17:47, Tom Lane wrote: > > Andreas Schmitz <[EMAIL PROTECTED]> writes: > > > ist there any way to cancel a user query as dba ? > > > > Send a SIGINT to the backend process running that query, eg > > > > kill -INT > > > > This has the same effect as a user-requested cancel (eg ^C in psql). > > > > What about an implementation into the command structure ? Libpq has: PQrequestCancel() Where else did you want it? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [ADMIN] Database Server is too Slow
On Fri, 13 Dec 2002, Ing. Gabriel Monsalvo wrote: > Hi! > I need help, i mounted a Postgresql server on IBM netserver with RAID 5 134 GB, 2.5 >GB de RAM and two Xeon 1.4 ghz. > I installed postgresql 7.3 in this box, my database have over 25 millons of records, >and everything is slow. > i optimized with indexes,vacuum analyze and tuning up the kernel for shared memory >usage. > but the server is too slow when: > - create index for any table with more than 5 millions > - vacuum takes over four hours in this type of tables. > - select max (field) from table where field2= takes a lot of time. > > explain select max(numoble) from obligacion where periodo=200100; For this sort of query, I'd suggest trying select numoble from obligaction where periodo=200100 order by periodo desc, numoble desc limit 1; with an index on (periodo, numoble) (I think). You can see messages about max and min in the archives for me information. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[ADMIN] pg_dumpall doesn't work
This is what I get when I do a pg_dumpall. I have *no* idea what to do here. I'm trying to migrate from 7.0.3 to 7.2.1, and the manual said to use pg_dumpall for this rather than using pg_dump on each database (which works). *Please* help. [postgres@everest /tmp]$ pg_dumpall -u > file Password: psql: Password authentication failed for user 'postgres' \connect template1 select datdba into table tmp_pg_shadow from pg_database where datname = 'template1'; delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba; drop table tmp_pg_shadow; copy pg_shadow from stdin; Password: psql: Password authentication failed for user 'postgres' \. delete from pg_group; copy pg_group from stdin; Password: psql: Password authentication failed for user 'postgres' \. Password: [postgres@everest /tmp]$ cat file \connect template1 select datdba into table tmp_pg_shadow from pg_database where datname = 'template1'; delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba; drop table tmp_pg_shadow; copy pg_shadow from stdin; \. delete from pg_group; copy pg_group from stdin; \. [postgres@everest /tmp]$ psql -V psql (PostgreSQL) 7.0.3 contains readline, history, multibyte support Portions Copyright (c) 1996-2000, PostgreSQL, Inc Portions Copyright (c) 1996 Regents of the University of California Read the file COPYRIGHT or use the command \copyright to see the usage and distribution terms. [postgres@everest /tmp]$ -- Justin Georgeson UnBound Technologies, Inc. http://www.unboundtech.com Main 713.329.9330 Fax713.460.4051 Mobile 512.789.1962 5295 Hollister Road Houston, TX 77040 Real Applications using Real Wireless Intelligence(tm) ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [ADMIN] pg_dumpall doesn't work
Justin Georgeson <[EMAIL PROTECTED]> writes: > This is what I get when I do a pg_dumpall. I have *no* idea what to do > here. It's a lot easier to do pg_dumpall if you are not using password authentication. Consider downgrading your pg_hba setting to "trust" for local connections while you do the dump. (In 7.2 you could perhaps use ident, or at least secure the socket with filesystem access restrictions.) > I'm trying to migrate from 7.0.3 to 7.2.1, *Please* make that 7.2.3 not 7.2.1. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [ADMIN] pg_dumpall doesn't work
Tom Lane wrote: Justin Georgeson <[EMAIL PROTECTED]> writes: This is what I get when I do a pg_dumpall. I have *no* idea what to do here. It's a lot easier to do pg_dumpall if you are not using password authentication. Consider downgrading your pg_hba setting to "trust" for local connections while you do the dump. (In 7.2 you could perhaps use ident, or at least secure the socket with filesystem access restrictions.) I'll give that a try. I'm trying to migrate from 7.0.3 to 7.2.1, *Please* make that 7.2.3 not 7.2.1. Will look into to that too, especially since postgresql.org has RH RPMs. (I'm a total RH weenie). Sorry if I sounded whiney with the *please*, but the last few times I've emailed community support lists, I haven't received any response at all, even just to tell me to stop asking. Thanks for your quick response. -- Justin Georgeson UnBound Technologies, Inc. http://www.unboundtech.com Main 713.329.9330 Fax713.460.4051 Mobile 512.789.1962 5295 Hollister Road Houston, TX 77040 Real Applications using Real Wireless Intelligence(tm) ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[ADMIN] [SOLVED] RE: PostgreSQL 7.3 installation on RedHat 8.0 fails
Sorry for the chatter. I used "gmake" instead of "make" and passed all 89 tests. That's a new one on me. With apologies, Murthy -Original Message- From: Murthy Kambhampaty Sent: Friday, December 13, 2002 15:58 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: PostgreSQL 7.3 installation on RedHat 8.0 fails On RedHat 8.0 (upgraded from Red Hat 7.2 with PostgreSQL 7.2.3), "make check" gives the following error: "/home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loc al/pgsql/bin/pg_encoding: relocation error: /home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loca l/pgsql/bin/pg_encoding: undefined symbol: pg_char_to_encoding createdb: "SQL_ASCII" is not a valid encoding name pg_regress: createdb failed" ./configure line was: CFLAGS='-O2 -pipe' ./configure --enable-integer-datetimes --with-perl --with-python --with-tcl --enable-syslog On a different machine, I have successfully compiled and installed running RedHat 8.0 (but without an existing PostgreSQL installation) and passed all tests. Any help with this problem would be much appreciated. Thanks, Murthy -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 20:09 To: Shibashish Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [ADMIN] PostgreSQL 7.3 Installation on SCO It should have worked, but edit Makefile.shlib and remove that offending export from the link line. That may fix it. --- Shibashish wrote: > Dear Sir, > > I use SCO Open Server 5.0.5 on an intel box. Although I have installed and > used PostgreSQL on Linux, setting it on SCO has not been successful :$ > I have downloaded the latest version ie "Postgresql-7.3" I have also tried > installing postgresql-7.1 and postgresql-7.2.3, but never succeeded. > > I also installed "ant" package for using java. I have "tcl8.0," "tk8.0," > "itclsh3.0" and "itkwish3.0" installed in my system. > "gcc version 2.7.2.1" > "Java 2 SDK, Standard Edition, v. 1.2.1" > "GNU Make 3.80" > > My "configure" command was as following ... > ./configure --prefix=/data/pgsql --with-perl --with-tcl > --with-tclconfig=/data/tcl/lib/ --with-tkconfig=/data/tk/lib/ > --with-java --without-readline --without-zlib > > The output has been attached as file "configoutput.txt" > > Then i give the "make" command. The compiling stops on an error and > exits after some time. The output has been attached as file > "makeoutput.txt" > > I'd be thankful to you if you can help me out sort the problem. I got your > mail-ids from the net and came to know that you are working on the similar > lines. > > Also, in the file doc/FAQ_SCO, does the section "Compiling PostgreSQL 7.1 > with the UDK" apply to release 7.3 of Postgresql ? I am not using UDK. > > Waiting for a quick response from your end. kindly inform me if you have > already solved the problem, or whether any patch is available. Any > documentation or url will be highly helpful. > > Thanking You in anticipation. > > with regards > Shibashish > > [EMAIL PROTECTED] > On Yahoo Messenger : shib_leo > > Software Engineer > IIT Bombay, India. Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [ADMIN] [SOLVED] RE: PostgreSQL 7.3 installation on RedHat 8.0
Murthy Kambhampaty writes: > Sorry for the chatter. I used "gmake" instead of "make" and passed all 89 > tests. That's a new one on me. They're the same program, so this wasn't the cause. You probably installed the files before you reran the regression tests, which typically fixes this sort of problem. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[ADMIN] PostgreSQL 7.3 installation on RedHat 8.0 fails
On RedHat 8.0 (upgraded from Red Hat 7.2 with PostgreSQL 7.2.3), "make check" gives the following error: "/home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loc al/pgsql/bin/pg_encoding: relocation error: /home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loca l/pgsql/bin/pg_encoding: undefined symbol: pg_char_to_encoding createdb: "SQL_ASCII" is not a valid encoding name pg_regress: createdb failed" ./configure line was: CFLAGS='-O2 -pipe' ./configure --enable-integer-datetimes --with-perl --with-python --with-tcl --enable-syslog On a different machine, I have successfully compiled and installed running RedHat 8.0 (but without an existing PostgreSQL installation) and passed all tests. Any help with this problem would be much appreciated. Thanks, Murthy -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 20:09 To: Shibashish Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [ADMIN] PostgreSQL 7.3 Installation on SCO It should have worked, but edit Makefile.shlib and remove that offending export from the link line. That may fix it. --- Shibashish wrote: > Dear Sir, > > I use SCO Open Server 5.0.5 on an intel box. Although I have installed and > used PostgreSQL on Linux, setting it on SCO has not been successful :$ > I have downloaded the latest version ie "Postgresql-7.3" I have also tried > installing postgresql-7.1 and postgresql-7.2.3, but never succeeded. > > I also installed "ant" package for using java. I have "tcl8.0," "tk8.0," > "itclsh3.0" and "itkwish3.0" installed in my system. > "gcc version 2.7.2.1" > "Java 2 SDK, Standard Edition, v. 1.2.1" > "GNU Make 3.80" > > My "configure" command was as following ... > ./configure --prefix=/data/pgsql --with-perl --with-tcl > --with-tclconfig=/data/tcl/lib/ --with-tkconfig=/data/tk/lib/ > --with-java --without-readline --without-zlib > > The output has been attached as file "configoutput.txt" > > Then i give the "make" command. The compiling stops on an error and > exits after some time. The output has been attached as file > "makeoutput.txt" > > I'd be thankful to you if you can help me out sort the problem. I got your > mail-ids from the net and came to know that you are working on the similar > lines. > > Also, in the file doc/FAQ_SCO, does the section "Compiling PostgreSQL 7.1 > with the UDK" apply to release 7.3 of Postgresql ? I am not using UDK. > > Waiting for a quick response from your end. kindly inform me if you have > already solved the problem, or whether any patch is available. Any > documentation or url will be highly helpful. > > Thanking You in anticipation. > > with regards > Shibashish > > [EMAIL PROTECTED] > On Yahoo Messenger : shib_leo > > Software Engineer > IIT Bombay, India. Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
FW: [ADMIN] RE: PostgreSQL 7.3 installation on RedHat 8.0 fails [Follow up]
I tested database creation using v7.2.3 and I get the same pg_encoding error if I give the "-E SQL_ASCII" option to createdb. If I don't give any options, it creates the database just fine, and shows the encoding to be SQL_ASCII. Moreover, issuing the query "create database testmenow with template=template1 encoding='SQL_ASCII'" from psql goes fine. Murthy -Original Message- From: Murthy Kambhampaty [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 15:58 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [ADMIN] PostgreSQL 7.3 installation on RedHat 8.0 fails On RedHat 8.0 (upgraded from Red Hat 7.2 with PostgreSQL 7.2.3), "make check" gives the following error: "/home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loc al/pgsql/bin/pg_encoding: relocation error: /home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loca l/pgsql/bin/pg_encoding: undefined symbol: pg_char_to_encoding createdb: "SQL_ASCII" is not a valid encoding name pg_regress: createdb failed" ./configure line was: CFLAGS='-O2 -pipe' ./configure --enable-integer-datetimes --with-perl --with-python --with-tcl --enable-syslog On a different machine, I have successfully compiled and installed running RedHat 8.0 (but without an existing PostgreSQL installation) and passed all tests. Any help with this problem would be much appreciated. Thanks, Murthy -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 20:09 To: Shibashish Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [ADMIN] PostgreSQL 7.3 Installation on SCO It should have worked, but edit Makefile.shlib and remove that offending export from the link line. That may fix it. --- Shibashish wrote: > Dear Sir, > > I use SCO Open Server 5.0.5 on an intel box. Although I have installed and > used PostgreSQL on Linux, setting it on SCO has not been successful :$ > I have downloaded the latest version ie "Postgresql-7.3" I have also tried > installing postgresql-7.1 and postgresql-7.2.3, but never succeeded. > > I also installed "ant" package for using java. I have "tcl8.0," "tk8.0," > "itclsh3.0" and "itkwish3.0" installed in my system. > "gcc version 2.7.2.1" > "Java 2 SDK, Standard Edition, v. 1.2.1" > "GNU Make 3.80" > > My "configure" command was as following ... > ./configure --prefix=/data/pgsql --with-perl --with-tcl > --with-tclconfig=/data/tcl/lib/ --with-tkconfig=/data/tk/lib/ > --with-java --without-readline --without-zlib > > The output has been attached as file "configoutput.txt" > > Then i give the "make" command. The compiling stops on an error and > exits after some time. The output has been attached as file > "makeoutput.txt" > > I'd be thankful to you if you can help me out sort the problem. I got your > mail-ids from the net and came to know that you are working on the similar > lines. > > Also, in the file doc/FAQ_SCO, does the section "Compiling PostgreSQL 7.1 > with the UDK" apply to release 7.3 of Postgresql ? I am not using UDK. > > Waiting for a quick response from your end. kindly inform me if you have > already solved the problem, or whether any patch is available. Any > documentation or url will be highly helpful. > > Thanking You in anticipation. > > with regards > Shibashish > > [EMAIL PROTECTED] > On Yahoo Messenger : shib_leo > > Software Engineer > IIT Bombay, India. Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] Content-Description: [ Attachment, skipping... ] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [ADMIN] PostgreSQL 7.3 installation on RedHat 8.0 fails
Murthy Kambhampaty <[EMAIL PROTECTED]> writes: > "/home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loc > al/pgsql/bin/pg_encoding: relocation error: > /home/postgres/postgresql-7.3/src/test/regress/./tmp_check/install//usr/loca > l/pgsql/bin/pg_encoding: undefined symbol: pg_char_to_encoding This usually means that the dynamic linker is picking up a version of libpq.so that doesn't have MULTIBYTE support, but the program you are trying to run requires MULTIBYTE. Fix: update your ldconfig settings so that the thing finds the version of libpq.so you just built, rather than whatever old version it's finding. pg_regress tries to get the system to notice the libpq.so that it installed in the tmp_check/install area, but I believe it's quite a ways short of making that work correctly everywhere. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org