Re: [GENERAL] Postgres server startup

2009-04-15 Thread John R Pierce
CM J wrote: Hi, When logged in as administrator, i start the postgres server with the following command: runas /user:postgres D:\postgres_new\pgsql\bin\pg_ctl.exe start -D D:\postgres_new\pgsql\data The problem is runas cmd is not script friendly as i can not pass the

Re: [GENERAL] Looking for advice on database encryption

2009-04-16 Thread John R Pierce
Bill Moran wrote: What are folks doing to protect sensitive data in their databases? I would probably do my encryption in the application layer, and only encrypt the sensitive fields. fields used as indexes probably should not be encrypted, unless the only index operation is EQ/NE, then

Re: [GENERAL] Looking for advice on database encryption

2009-04-16 Thread John R Pierce
Bill Moran wrote: The problem comes when the company head wants to search through the database to find out which employee has a specific SSN. He should be able to do so, since he has access to everything, but the logistics of doing so in a reasonable amount of time are rather complex and very

Re: [GENERAL] Looking for advice on database encryption

2009-04-16 Thread John R Pierce
Eric Soroos wrote: an index on the encrypted SSN field would do this just fine. if authorized person needs to find the record with a specific SSN, they encrypt that SSN and then look up the ciphertext in the database... done. This will only work for e(lectronic?) code book ciphers,

Re: [GENERAL] postgreSQL amazon ec2 cloud

2009-04-20 Thread John R Pierce
Bob Pawley wrote: From your experience could it be used in similar fashion as a website - running a Postgresql database and having users access the database through an interface? If so, would the users need a Java environment installed on their machines ... um, the users would need a Java

Re: [GENERAL] Help request to improve function performance

2009-04-22 Thread John R Pierce
Seref Arikan wrote: I have a set of dynamically composed objects represented in Java, with string values for various attributes, which have variable length. In case you have suggestions for a better type for this case, it would be my pleasure to hear about them. cut out about 3 layers of

Re: [GENERAL] Web + Slicing/Paging datas

2009-04-23 Thread John R Pierce
durumdara wrote: Hi! In a mod_py application I wanna write a wrapper that handle all PSQL data view with paging/slicing. .. Inserts all records to a temp table. Check the affected rows (as count). Slicing the records. Fetch the slice records. Destroy temp table. how about KEEPING the data

Re: [GENERAL] Best way to install postgres? RPM/Source Code Build

2009-04-28 Thread John R Pierce
DM wrote: Hi All, What is the best way to Install postgres database? We have installed (2) versions of the postgres on th server using source code (compiling and building) (/usr/local/pgsql/8.3.3/ and /usr/local/pgsql/8.3.6/) and our data directory is (/mnt/data/pgsql/) Our database size is

Re: [GENERAL] Online Backups PostGre

2009-05-01 Thread John R Pierce
Joshua D. Drake wrote: Well that's just it. Out of the box it doesn't actually work. PostgreSQL only gives you the facilities to roll your own PITR solution. You can look at PITR Tools: https://projects.commandprompt.com/public/pitrtools It doesn't quite work on Windows due to lack of rsync

Re: [GENERAL] windows service

2009-05-03 Thread John R Pierce
Adam Ruth wrote: One option is sc.exe command. sc create postgresql binPath= ^c:\scholarpack\postgres\bin\pg_ctl.exe^ runservice -w -N ^P4^ -D ^c:\scholarpack\data^ -start auto except, on a SC CREATE, you'd need to specify a lot more than just the binpath. I'd suspect at least obj=

Re: [GENERAL] Postgres: Transaction Connections

2009-05-05 Thread John R Pierce
CM J wrote: Hi , I use postgres database server 8.2.12 with my java application. I was wondering if postgres supports transactions by default or do i have to turn some parameter on to enable transaction support ? Postgres supports transactions by default. Postgres JDBC drivers

Re: [GENERAL] PGSQL x iptables

2009-05-06 Thread John R Pierce
Slansky Lukas wrote: Hello, we’re using PG and Application Server (JBoss) on separate CentOS servers with Cisco PIX in between. On DB side is iptable with following relevant rules: 1. -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT 2. -A RH-Firewall-1-INPUT -m state

Re: [GENERAL] XML - PG ?

2009-05-06 Thread John R Pierce
Gauthier, Dave wrote: Is there a way to read an XML file into a postgres DB? I’m thinking that it will create and relate whatever tables are necessary to reflect whatever’s implied by the XML file structure. Thanks for any pointers ! As others have said, the fundamental problem is that

Re: [GENERAL] Optimizing tuning and table design for large analytics DB

2009-05-07 Thread John R Pierce
Rob W wrote: Can anyone point me towards good articles or books that would help a PostgreSQL novice (i.e. me) learn the optimal approaches to setting up a DB for analytics? In this particular case, I need to efficiently analyze approximately 300 million system log events (i.e. time series

Re: [GENERAL] migrating from MSSQL

2009-05-08 Thread John R Pierce
Eugene . wrote: Hi all, I've been tasked with evaluating the feasibility of migrating our in-house application from MSSQL to PostgreSQL. It is fairly old and has lots of stored procedures, which is why we need to think carefully before making the switch. Does anyone else have a similar

Re: [GENERAL] Column oriented pgsql

2009-05-08 Thread John R Pierce
Mag Gam wrote: Is it possible to tweak (easily) Postgresql so the storage is column oriented versus row-oriented? We would like to increase read optimization on our data which is about 2TB. you read your tables by column, rather than by row?? SQL queries are inherently row oriented,

Re: [GENERAL] Remote access

2009-05-08 Thread John R Pierce
George Weaver wrote: Hi, I have a client with a main office and a branch office about 90 miles away. They have a server at the main office but it is not a web server. What would be the best solution for them to access a PostgreSQL database located at the main office from the branch

Re: [GENERAL] Column oriented pgsql

2009-05-08 Thread John R Pierce
Joshua Tolley wrote: http://en.wikipedia.org/wiki/Column_oriented_database This has come up on the lists from time to time; the short answer is it's really hard. indeed. among other issues is, just what order should those columns be stored in? database tables have no implicit order, they

Re: [GENERAL] postgresql on windows98

2009-05-14 Thread John R Pierce
RaviThapliyal wrote: but i need to run postgresql on windows98. Many of our clients are working on windows98 :(. Any way out for this? run the postgres CLIENT on the client machines, and run the postgres SERVER on a server. -- Sent via pgsql-general mailing list

Re: [GENERAL] Daylight saving time question

2009-05-18 Thread John R Pierce
Bayless Kirtley wrote: How can I tell PostgreSQL to use daylight saving time when applicable? Times returned by the database are one hour behind. it uses your client's specified local time zone to determine whether or not DST is in effect. SET TIME ZONE 'America/New York'; or SET

Re: [GENERAL] Need help

2009-05-18 Thread John R Pierce
Zico wrote: On Mon, May 18, 2009 at 6:11 PM, Albe Laurenz laurenz.a...@wien.gv.at mailto:laurenz.a...@wien.gv.at wrote: I'm still not sure what that means, but if you have the contents of the database, but the database itself is gone without a trace, then what else can you do

Re: [GENERAL] origins/destinations

2009-05-19 Thread John R Pierce
Andy Colson wrote: Carson Farmer wrote: Hi list, I have (what I thought was) a relatively simple problem, but my knowledge of sql is just not good enough to get this done: I have a table which is basically a number of individuals with both their origin and destination as columns (see Table

Re: [GENERAL] Direct I/O and postgresql version

2009-05-19 Thread John R Pierce
Pal, Dipali (UMKC-Student) wrote: Hi All, I have one question. Which of the recent versions of postgresql support direct I/O? that would be, none. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Need beginning and ending date value for a particular week in the year

2009-05-26 Thread John R Pierce
So for the calculated week value (i.e. 2009w22) I need to be able to calculate the first and last day of the week (05/25/2009 and 05/31/2009). Is there a clean / fairly easy way to do this? I can think of doing some string comparisons and walking through date values to figure it out but

Re: [GENERAL] How to speed up the first-time-searching in pgsql?

2009-05-26 Thread John R Pierce
zxo102 ouyang wrote: Hi all, I have a table which has more than 10millions records in pgsql which is running on window 2003. During night, nobody search the database. In morning, when people start to the application, it will take more than 30 seconds to get database back. After several

Re: [GENERAL] How to initiate a new log file?

2009-05-26 Thread John R Pierce
ray wrote: While debugging applications interacting with pg, the log file (under pg_log) gets quite long. The log file typically has a name such as postgresql-2009-05-26_00.log; sometimes an new file will be generated on the same day and the portion of the name that is all zeroes will

Re: [GENERAL] Postgres registry access using java

2009-05-28 Thread John R Pierce
Anirban Pal wrote: Thanks Josh for your kind reply. In the pg_settings table all reference to the folder is with reference to data directory. Like config_file C:/Program Files/PostgreSQL/8.3/data/postgresql.conf data_directory C:/Program Files/PostgreSQL/8.3/data hba_file C:/Program

Re: [GENERAL] Switching databases over JDBC/ODBC

2009-05-29 Thread John R Pierce
Scott Bailey wrote: Is there an equivalent to psql's \connect database or MySQL/MS SQL's use database command that will work with JDBC? It doesn't seem like I should need to drop the connection and establish a new one just to switch databases. the \connect command disconnects from the current

Re: [GENERAL] Switching databases over JDBC/ODBC

2009-05-29 Thread John R Pierce
Martin Gainty wrote: does '\connect' work with Type-IV JDBC Database? can you effectively 'drop' the first DB connection and somehow read a different set of DB parameters to connect to a new DB? \connect is a psql command, nothing to do with JDBC. In Java, you would Close() a JDBC

Re: [GENERAL] Switching databases over JDBC/ODBC

2009-05-29 Thread John R Pierce
Martin Gainty wrote: true scott was asking if you can utilise the same JDBC Type IV DB connection for both the original DB connection and utilise that same connection to connect to another DB (with a fresh set of database parameters) my answer is i do not know of a way to use the same

Re: [GENERAL] Switching databases over JDBC/ODBC

2009-05-30 Thread John R Pierce
Scott Bailey wrote: Well at work we've got Oracle, MySQL, MS SQL and Postgres. So I generally use Aqua Data Studio because it works with all of them. For MySQL and MS SQL you register a single connection to the server and can switch to any database. But with Postgres, you have to register a

Re: [GENERAL] pg_dump table space

2009-06-01 Thread John R Pierce
Luca Ferrari wrote: Hi, is there a way to dump an entire database which has a specific table space without having in the sql file any reference to the tablespace? This can be useful when moving the database from one machine to another (that does not use the tablespace). Any way to achieve

Re: [GENERAL] pg_dump table space

2009-06-01 Thread John R Pierce
John R Pierce wrote: Luca Ferrari wrote: Hi, is there a way to dump an entire database which has a specific table space without having in the sql file any reference to the tablespace? This can be useful when moving the database from one machine to another (that does not use the tablespace

Re: [GENERAL] loops

2009-06-02 Thread John R Pierce
Esneiker wrote: Hello, can anybody tell me how to do loops in postgres? SQL, the query language, has no such control structures. SQL is a 'declarative' language rather than a procedural one. pl/pgsql stored procedures do, however, as they embed SQL in a procedural context. depesz

Re: [GENERAL] Really out of memory?

2009-06-02 Thread John R Pierce
Ben Chobot wrote: May 31 02:59:40 sfmelwss postgres[30103]: [1-1] ERROR: out of memory May 31 02:59:40 sfmelwss postgres[30103]: [1-2] DETAIL: Failed on request of size 16777212. Thats a 16MB request is that your work_mem size or something by any chance? 02:30:01 AM kbmemfree kbmemused

Re: [GENERAL] postgresql source code is worth to read

2009-06-05 Thread John R Pierce
youngvon...@gmail.com wrote: On 6月4日, 下午1时52分, youngvon...@gmail.com youngvon...@gmail.com wrote: i want to understand database knowledge about ipc,store,etc with a project,ie,postgresql. I want to ask postgresql source code is very good, is worth to learn . I want to ask if

Re: [GENERAL] Postgres connectivity problem.

2009-06-15 Thread John R Pierce
Bhujbal, Santosh wrote: Hi All, Postgres ‘psql’ client is getting hang in ‘stat’ call while connecting to postgres server. Pstack output: 11017: ./bin/psql -U postgres configdb stat (ff3f5640, ffbff578) My machine details: SunOS my_machine 5.10 Generic_120011-14 sun4u sparc

Re: [GENERAL] horizontal sharding

2009-06-15 Thread John R Pierce
Jim Mlodgenski wrote: also is it possible to paritition without changing client code Yes, but it depends on the SQL in your client code. If you are just using simple SQL with no stored functions, you should be able to slip in either solution without changing the client code. what

Re: [GENERAL] nagios -- number of postgres connections

2009-06-16 Thread John R Pierce
Whit Armstrong wrote: anyone know a way to get nagios to monitor the number of postgres connections? a script that counts how many lines of postgres processes there are and subtracts a few $ ps -C postmaster uww USER PID %CPU %MEMVSZ RSS TTY STAT START TIME

Re: [GENERAL] Data merging problem

2009-06-17 Thread John R Pierce
subodh chaudhari wrote: Hi , I am working on project which include merging of two databases within postgresql on Linux. I have searched for s/w but didnt get any useful. So if any one having any information about such s/w please help me out. This s/w should have GPL. (Opensource s/w). I want

Re: [GENERAL] PostgreSQL server NOT STARTED

2009-06-17 Thread John R Pierce
Chandra Sekar R wrote: I recently installed PostgreSQL 8.3.7 into my windows xp m/c. When I start PostgreSQL server through My computercontrol panelAdministrative toolsservicesPostgreSQL serverstart NOT STARTED and the following error mesage appeared: some services started and stoped

Re: [GENERAL] Maintaining user roles and permissions in Postgres - general question

2009-06-18 Thread John R Pierce
Postgres User wrote: Does anyone have a recommendation for maintaining user permissions on a changing database? The lack of an option to grant specific rights to all objects of a given type within a Postgres db obviously places the burden on the administrator to keep roles updated as objects

Re: [GENERAL] Need help using function

2009-06-26 Thread John R Pierce
Bob Pawley wrote: Hi I want to try using functions but I am having trouble understanding return. ... The error message - control reached end of function without RETURN I have attempted adding - Return integer; to the end of the function with no success. I'd try adding RETURN

Re: [GENERAL] horizontal sharding

2009-06-26 Thread John R Pierce
mobiledream...@gmail.com wrote: can someone show how to setup pgpool 2 in parallel *query* mode ie horizontal partitioning did you look at http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html#parallel ? I'd pay close attention to the restrictions here, too...

Re: [GENERAL] Password?

2009-07-08 Thread John R Pierce
Ms swati chande wrote: Made the following change in the postgresql.conf file: listen_addresses = 'xxx.xxx.x.x' (my current ip) and in pg_hba: host all all 'xxx.xxx.x.x' trust ... 6.Opened another command

Re: [GENERAL] Checkpoint Tuning Question

2009-07-08 Thread John R Pierce
Tom Lane wrote: He's only got 100MB of shared buffers, which doesn't seem like much considering it's apparently a fairly beefy system. a beefy system with... Harddrive is just a simple, run-of-the-mill desktop drive. which is going to severely limit random write throughput --

Re: [GENERAL] c++ program to connect to postgre database

2009-07-08 Thread John R Pierce
ramon rhey serrano wrote: Hello, I'm thinking of making a program in C++ (API) that will connect, read, and write to a PostgreSQL database. I honestly have no idea where to start and how to implement it in C++ using Dev C++ IDE. Any help would be greatly appreciated. C++ easily calls C

Re: [GENERAL] c++ program to connect to postgre database

2009-07-09 Thread John R Pierce
ramon rhey serrano wrote: Hi Sir John, Thanks for the links and reply. I downloaded this libpqxx-3.0 but i really don't know what to do with the file and where to put them. I'm still having hard time how to start the C++ program using Dev C++ as my IDE, what files do i need to install, what

Re: [GENERAL] ZFS prefetch considered evil?

2009-07-09 Thread John R Pierce
Alban Hertroys wrote: I don't know how you partitioned your zpools, but to me it seems like it'd be preferable to have the PostgreSQL tablespaces (and possibly other data that's likely to be accessed randomly) in a separate zpool from the rest of the system so you can restrict disabling

Re: [GENERAL] Help me please...

2009-07-09 Thread John R Pierce
ja...@aers.ca wrote: if you used default locations I believe it should be (this is from memory mind) under c:\program files\postgres\version\data\ data is the folder you want. First, verify the location of pgdata... sc qc pgsql-8.3 (I'm assuming this is 8.3, modify for other

Re: [GENERAL] Database storage

2009-07-10 Thread John R Pierce
nabble.30.miller_2...@spamgourmet.com wrote: The database server is a quad core machine, so it sounds as though software RAID should work fine for the present setup. However, it sounds as though I should put some money into a hardware RAID controller if the database becomes more active. I had

Re: [GENERAL] Idle in transaction help

2009-07-10 Thread John R Pierce
Scot Kreienkamp wrote: Hi everyone, I need some help with tracking down idle in transaction problems. We have a custom application that is leaving queries in idle in transaction status for unknown reasons. The developers are working on ways to track it down, but right now the options on

Re: [GENERAL] Idle in transaction help

2009-07-10 Thread John R Pierce
Scot Kreienkamp wrote: It is Java. I asked our programmers to check on the JDBC version as I had seen that on the list previously. It is using postgresql-8.2-504. Is that one of the problem versions? I had thought it was new enough that it would not be subject to that problem. well, the

Re: [GENERAL] change location of postmaster.pid file?

2009-07-10 Thread John R Pierce
Greg Stark wrote: It won't work even a little bit before 8.3. For 8.3 or later you could maybe make it work using vacuum freeze but there's no facility to verify that it's really frozen everything and you'll still be taken by surprise by queries which try to use temporary space for large sorts

[GENERAL] savepoints in 8.3.7 or whatever...

2009-07-15 Thread John R Pierce
we have an app thats doing massive amounts of inserts, batched in transactions, multiple concurrent connections (tuned for optimal throughput, usually around 1 thread per cpu core plus a couple more). occasionally a transaction gets duplicated, and that causes a constraint violation which

Re: [GENERAL] Concurrency issue under very heay loads

2009-07-15 Thread John R Pierce
Raji Sridar (raji) wrote: Hi, We use a typical counter within a transaction to generate order sequence number and update the next sequence number. This is a simple next counter - nothing fancy about it. When multiple clients are concurrently accessing this table and updating it, under

Re: [GENERAL] Understanding sequential versus index scans.

2009-07-19 Thread John R Pierce
Robert James wrote: Hi. I notice that when I do a WHERE x, Postgres uses an index, and when I do WHERE y, it does so as well, but when I do WHERE x OR y, it doesn't. Why is this so? And how can I shut this off? maybe its because you have no index on (X OR Y) ? or maybe because the

Re: [GENERAL] Server Backup: pg_dump vs pg_dumpall

2009-07-20 Thread John R Pierce
APseudoUtopia wrote: Hey, I'm writing a backup script. Right now, I only have one database on my postgresql server. I'm deciding if I should use pg_dump or pg_dumpall when backing up the server. As far as I can tell, pg_dumpall cannot compress the dumps automatically and it only dumps data

Re: [GENERAL] Search Path vs Synonyms

2009-07-24 Thread John R Pierce
Matthew Seaborn wrote: Ah, I am actually using EnterpriseDB (a commercial 'fork' of PSQL) which does have synonyms. then you likely will get more help from EnterpriseDB's technical support, as only they are really familiar with their proprietary and commercial product. -- Sent via

Re: [GENERAL] Very slow joins

2009-07-24 Thread John R Pierce
MS wrote: Btw. It looks like this issue: http://archives.postgresql.org/pgsql-performance/2007-09/msg00374.php In my case the CPU usage is low too (3%) but IO wait is high (95%). I'm using Postgresql 8.3. for more info on disk iowaits, use `iostat -x 5` (5 means sample every 5

Re: [GENERAL] Run procedure at startup

2009-07-27 Thread John R Pierce
Saleem EDAH-TALLY wrote: Is there a way to run a pl/pgsql automatically at server startup ? in your postgres startup script launch a session with `psql ... -c some sql commands` or `psql ... -f somescript.sql` ... Is there a way to run a pl/pgsql function with an infinite loop as a daemon

Re: [GENERAL] Video available for PGDay SJC '09

2009-07-28 Thread John R Pierce
Greg Stark wrote: I think I'm scarred from Quicktime files because they often were encoded with codecs like Sorensen which produced proprietary formats. agreed, and the quicktime installer dragging in itunes if you don't remember to uncheck all the right boxes, and quicktime nagging you

Re: [GENERAL] Reg: Data Conversion in PGSQl

2009-07-30 Thread John R Pierce
Rama Mohan Reddy wrote: Hi Gurus, My Client gave me data in .dat format for each table, which is in postgresql in linux environment I want to table data in windows environment I'd suggest taking a look at those .dat files, see if they are in fact CSV or SQL or what. for instance, in a

Re: [GENERAL] Limiting records in pg_dump

2009-07-31 Thread John R Pierce
Arnold, Sandra wrote: Is there a way to just dump records equal to a specific value using pg_dump? In Oracle, you can export data and use a WHERE clause and only pull a range of data. We currently use this in Oracle to load data sets in our Development database. As we move to PostgreSQL we

Re: [GENERAL] change ownership on all tables

2009-07-31 Thread John R Pierce
Alan McKay wrote: OK, my DB Admin is on vacation, and 15 minutes of googling didn't get me the answer :-) Although in that 15 minutes I could have done all 109 tables manually :-) I know this command for a single table, and checked the manual but don't see anything about wildcards ALTER TABLE

Re: [GENERAL] building a binary-portable database

2009-07-31 Thread John R Pierce
Alexy Khrabrov wrote: I've filled a database on Linux and tried to bring it across to Mac OSX, and got an error: FATAL: incorrect checksum in control file. use pg_dumpall | psql to export/import databases between machines. -- Sent via pgsql-general mailing list

Re: [GENERAL] Drop Cluster

2009-08-01 Thread John R Pierce
sw...@opspl.com wrote: Hi, Is there any command to drop a postgres cluster??? I tried the following link http://www.digipedia.pl/man/pg_dropcluster.8.html but it says command not found. Is there any other way?? Any help will be highly appreciated. I believe that command is specific to

Re: [GENERAL] Drop Cluster

2009-08-01 Thread John R Pierce
sw...@opspl.com wrote: I believe that command is specific to the debian/ubuntu distributions. in generic postgres, you'd simply stop the server, then delete the contents of the $PGDATA directory I cleared the PGDATA directory like this -- PGDATA= export PGDATA that just sets the

Re: [GENERAL] Can I add a super table to existing tables?

2009-08-01 Thread John R Pierce
Jun Yang wrote: On Sat, Aug 1, 2009 at 7:53 PM, David Fetter da...@fetter.org mailto:da...@fetter.org wrote: On Sat, Aug 01, 2009 at 06:28:54PM -0700, Jun Yang wrote: Hi all, I want to add some common columns to all of my tables. Your case may be very special, but

Re: [GENERAL] Refer to another database

2009-08-03 Thread John R Pierce
Andreas Kalsch wrote: Will it decrease performance to refer to other schemas? no. the schemas are simply two namespaces in the same database. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Refer to another database

2009-08-03 Thread John R Pierce
Andreas Kalsch wrote: This is what I want to do: To refer to another database, like I can do it in MySQL. After adding a schema with database name and refering to it from another database I get: ERROR: schema test does not exist Adding the database name: osm_de=# select * from

Re: [GENERAL] Refer to another database

2009-08-03 Thread John R Pierce
Andreas Kalsch wrote: Two causes: 1) I have to rewrite many lines of code = time 2) In MySQL I have access - with superuser rights - to _all_ existing databases inside the installation. In Postgres I haven't. hmm? the postgresql superuser has full access to all databases in the cluster.

Re: [GENERAL] Sequence Not created with pg_dump

2009-08-05 Thread John R Pierce
sw...@opspl.com wrote: Hello all, When I create a db dump using -- pg_dump -s dbname mydump.sql Sequences present are not being added to the mydump.sql file you'll need to be a -little- more specific... sure seems to me like its working on this centos5 linux + pg 8.3.7 system

Re: [GENERAL] Postgres memory question

2009-08-09 Thread John R Pierce
Kobus Wolvaardt wrote: Hi, We have software deployed on our network that need postgres, we have server that hosts the server and all worked fine until we crossed about 200 users. The application is written so that it makes a connection right at the start and keeps it alive for the duration

Re: [GENERAL] Postgres memory question

2009-08-09 Thread John R Pierce
Kobus Wolvaardt wrote: We have similar connection settings, same app, same DB, same username, same settings. What appart from installing pgpool do you need to do to get it to seamlessly share connections? Do you need to do anything in code? Do a special query to indicate the end of a

Re: [GENERAL] NOTICE: there is no transaction in progress

2009-08-10 Thread John R Pierce
Rodrick Hales wrote: We have two machines that run a C application that interfaces with a Postgres database. They are our development and production machines. The version is PostgreSQL 8.3.7 on i686-redhat-linux-gnu, complied by GCC gcc (GCC) 4.1.2.20071124 (Red Hat 4.1.2-42) . On the

Re: [GENERAL] mail alert

2009-08-11 Thread John R Pierce
Jan Verheyden wrote: Hi All, I was looking in what way it’s possible to alert via mail when some conditions are true in a database. a probe script that runs periodically (from crontab?) and checks said conditions, would probably be the best way. this could be tied into a Nagios style

Re: [GENERAL] Proxy for postgres

2009-08-14 Thread John R Pierce
Martin Spinassi wrote: I'm searching for something to use as a proxy for different instances of postgres. ... So the question is, what can I use as a proxy queries to different instances of postgres? perhaps if you better defined what you mean by 'proxy queries'... a 'proxy' is simply

Re: [GENERAL] Proxy for postgres

2009-08-14 Thread John R Pierce
Basically, what I'm searching for is something that relay sql to others postgres instances. The main goal is to have this proxy balancing, and better if it can figure out when a postgres server is down. It would give me better performance and will help mitigating the single point of failure,

Re: [GENERAL] Proxy for postgres

2009-08-14 Thread John R Pierce
Martin Spinassi wrote: So, what you suggest is: |- Master ---| pg_pool2 ---||- Slony |- Slave---| Can't figure out if this is gonna work, configuring pg_pool2 to read both, making slony replicate, and app directly to

Re: [GENERAL] 2 versions of Postgres on the same machine

2009-08-18 Thread John R Pierce
wstrzalka wrote: Hi This is probably more like linux question but strictly related to PG so I hope somebody can help me. I need to have 8.3 8.4 installed on the same machine (for pg_migrator). As I'm not Linux guru I used to install/update Postgres using yum from PGDG. Is there any

Re: [GENERAL] Best database model for canvassing (and analysing) opinion

2009-08-18 Thread John R Pierce
Sam Mason wrote: SELECT course, date, COUNT(*) FROM application_preferred_date GROUP BY course, date; Hope that gives you some ideas! the problem as stated is more complex than that. A student could, in theory, pick several different courses on the same dates on the assumption

Re: [GENERAL] Access Control System - Design

2009-08-18 Thread John R Pierce
Andre Lopes wrote: Hi, I need to implement a Access Control System, but I don't have any clue of what it is the ideal system... I will try to explain my problem... I have 4 levels of users in my web application, Super Administrator, Administrator, Manager and Worker. The database have

Re: [GENERAL] Field's position in Table

2009-08-20 Thread John R Pierce
Kalai R wrote: Hi , I have a problem in Postgres. When adding a new field in the existing table, i want to add the filed in a particular position. Is there any way to change the fields position in the table. Any Solution to this problem would be much appreciated. don't use * in SELECT

Re: [GENERAL] Regarding installing starting Postgres on Windows

2009-08-20 Thread John R Pierce
Vikram Patil wrote: Hello , I am trying to find a way to install PostgreSQL through my script/code . I don’t want to use installer provided on websites. I compiled source and and I installed in one directory , Now I am trying to register it as a service or start database server directly.

Re: [GENERAL] DB Design Advice

2009-08-20 Thread John R Pierce
stone...@excite.com wrote: Hey all, My company is designing a database in which we intend to store data for several customers. We are trying to decide if, A: we want to store all customer data in one set of tables with customer_id fields separating the data or, B: storing each customers

Re: R: [GENERAL] Field's position in Table

2009-08-24 Thread John R Pierce
Adam Rich wrote: For me, saying all new fields must go at the end of the table is like saying all new functions must go at the end of your C source file. Not that it makes *any* difference to the end user, or other applications using your libraries, but as developers we tend to be more

Re: [GENERAL] Import data from XML file

2009-08-26 Thread John R Pierce
Erwin Brandstetter wrote: Hi! How do you import data from an xml-file? For instance, if I have a file like this: ?xml version=1.0 encoding=utf-8? p_update main_categories main_category main_category_nameSonstiges/main_category_name main_category_id5/main_category_id

Re: [GENERAL] Viable alternatives to SQL?

2009-08-27 Thread John R Pierce
Joshua Tolley wrote: I've never heard of the first two, as far as I can recall. T-SQL is quite common, however (http://en.wikipedia.org/wiki/Transact-SQL), but although I've never used it, I seriously doubt it will make things any more user friendly. TransactSQL, sometimes called TSQL, is

Re: [GENERAL] Is there a function for Converting a Decimal into BINARY ?

2009-08-27 Thread John R Pierce
Ow Mun Heng wrote: Hi Guys, Searching the net didn't give me much clues as to how to convert a Decimal number into BINARY. well, a decimal number is a fixed point number stored in a modified BCD format, which optionally can contain a decimal fractional component. you likely would want

Re: [GENERAL] Eclipse jdbc postgresql

2009-08-31 Thread John R Pierce
Sheepjxx wrote: If I want to use postgres with jdbc , I have already download jdbc, do I need extra option for compile postgres?--with-java?do I need change postgres.conf? you just need postgres configured so you can connect to it via tcp (as jdbc doesn't do local domain sockets), and you

Re: [GENERAL] Enum

2009-09-01 Thread John R Pierce
Xai wrote: Is there a query i can use to get the fields of an Enum, just in case someone needs it for the client application. select e.enumlabel from pg_enum as e join pg_type as t on (t.typtype='e' and e.enumtypeid=t.typbasetype) where t.typname = $1 order by e.enumtypid; I think. or

Re: [GENERAL] handle audiofiles in postgres

2009-09-02 Thread John R Pierce
edisan wrote: Can anyone used or tell me how to handle audio files in postgres Audio files may be in wav / vox / dss format and each have average 30 min running time. probably too large to want to store in the database, as a 30 minute PCM .WAV file in CD quality could easily be 300

Re: [GENERAL] Can I Save images in postgres?

2009-09-08 Thread John R Pierce
纪晓曦 wrote: Can I save images in the postgres? How to define? Does the format matters? Can I save JPG/PNG?How? you can save images as BYTEA data, and the format is totally up to your application, as postgres just treats it as a block of bytes.however, I generally find it easier to store

Re: [GENERAL] where clauses and multiple tables

2009-09-08 Thread John R Pierce
Yaroslav Tykhiy wrote: By the way, folks, do you think there may be performance gain or loss from rewriting this with an explicit JOIN? E.g.: SELECT DISTINCT foo.foo_id, foo.name FROM foo JOIN bar ON foo.bar_id = bar.bar_id WHERE bar.name='martini'; I would expect that to be more efficient

Re: [GENERAL] postgresql.key secure storage

2009-09-13 Thread John R Pierce
Saleem EDAH-TALLY wrote: This concerns use of postgresql.key private key file on the client side. psql can't establish a connection. with an encrypted postgresql.key file. If I'm wrong here, the following is invalid and please show me the steps I'm ignoring. An application using libpq would

Re: [GENERAL] hardware information

2009-09-15 Thread John R Pierce
std pik wrote: Hello all.. I'm using PostgreSQL 8.3.. How can I get information about the hardware utilization: - CPU usage. - Disk space. - Memory allocation. what operating system are you on? If its Linux or some flavor of Unix, I'd use a combination of ps(1),

[GENERAL] Solaris Postgres

2009-09-15 Thread John R Pierce
anyone on the PG team privvy to Sun Solaris patches for postgres? like patch 138826-04 is Postgres 8.3.7 for Solaris10 Sparc... 138827-04 is the same for Sol10 x86... I'm curious if anyone has a clue how long before Sun releases PG 8.4.x in Solaris 'patch' format ... -- Sent via

Re: [GENERAL] Current state of XML capabilities in PostgreSQL?

2009-09-16 Thread John R Pierce
Nathan Widmyer wrote: I just plan on storing already-made XML in a column, then be able to search on it using where clauses with XPath expressions (e.g. select tv_show,xpath('/station/times', xml_data) from table_with_xml where xpath('/name', xml_data)='Captain Kangaroo'). I do understand

Re: [GENERAL] NAS

2009-09-17 Thread John R Pierce
Marco Fortina wrote: Hello there! A customer of our company would like to create a 2 nodes cluster connected to an external NAS storage. I would like to know if PostgreSQL supports its datafiles on this kind of storage and if this solution is certified. active/standby type cluster,

  1   2   3   4   5   6   7   8   9   10   >