[ADMIN] can't remote access from client with ODBC
We run Postgres7.3.2 on a OpenBSD34I try to connect to the postgres database fromwinxp boxes using postgres odbc driver ver. 7.02.00.05and thencreate a user dsn and then use a Borland Delphi tool called ODBCTest and trybut i get message "FATAL :no pg_hba.conf entry for host 192.168.228.59 userpostgres database template1".and thantry to edit pg_hba.conf and added command "host template1 postgres192.168.228.59 255.255.255.0 trust" but still doesn't work. so I missed something with ODBC? dv
[ADMIN] run httpd and postgresql on different machines ?
Hi, all, I want to set up a web site using apache httpd, php and postgresql. From the performance point of view, which architecture is better? 1) Run httpd and postgresql on the same machine; 2) Run postgresql on seperate machine. My concern is that the machine I am going to run httpd has limitted storage. I am expecting the increasing of postgresql database once I set it ip. Any suggestions and comments will be highly appreciated. -- Chuming Chen System Administrator NHLBI Proteomics Center Medical University of South Carolina 135 Cannon Street, Suite 303 Charleston SC 29425 Tel: 843-792-1555 (O) Fax: 843-876-1126 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [ADMIN] run httpd and postgresql on different machines ?
One machine to run httpd + php and a separate machine for postgres is very common and highly recommended. For safety, I would recommend using a private network (192.168.0.*) to connect the two machines, so your DB machine does not even have a public IP address. Ideally, use gigabit between the two machines. Be sure you configure your pg_hba.conf properly too. On Tue, 18 Jan 2005, Chuming Chen wrote: Hi, all, I want to set up a web site using apache httpd, php and postgresql. From the performance point of view, which architecture is better? 1) Run httpd and postgresql on the same machine; 2) Run postgresql on seperate machine. My concern is that the machine I am going to run httpd has limitted storage. I am expecting the increasing of postgresql database once I set it ip. Any suggestions and comments will be highly appreciated. -- Chuming Chen System Administrator NHLBI Proteomics Center Medical University of South Carolina 135 Cannon Street, Suite 303 Charleston SC 29425 Tel: 843-792-1555 (O) Fax: 843-876-1126 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match [ \ / [ X Christian Fowler | spider AT viovio.com [ / \ http://www.viovio.com | http://www.tikipro.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] how to keep the db connection
On Tue, 2005-01-18 at 00:04, guly wrote: I installed postgresql in redhat9.And in client I use pgAdmin .But after a while the db connection would be broken,I should reconnect the db again.How to keep the connection?Should I modifiy some parameters in config file. Most of the time this problem shows up it's a firewall between the client and server timing out the connection. Are you going through a firewall in this situation? ---(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] run httpd and postgresql on different machines ?
On Tue, 2005-01-18 at 07:36, Chuming Chen wrote: Hi, all, I want to set up a web site using apache httpd, php and postgresql. From the performance point of view, which architecture is better? 1) Run httpd and postgresql on the same machine; 2) Run postgresql on seperate machine. My concern is that the machine I am going to run httpd has limitted storage. I am expecting the increasing of postgresql database once I set it ip. Any suggestions and comments will be highly appreciated. It really depends on whether apache/php and postgresql are going to be fighting for the same resources. apache/php tends to be CPU intensive, while PostgreSQL tends to be I/O intensive. It might be more economical to simply upgrade the I/O subsystem on the one machine to be bigger and faster than to build a whole other machine. On the other hand, setting it up on two machines allows you to configure each one as the other's fail over so you can improve your reliability and performance. ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [ADMIN] PAM ldap
Thanks for the reply, I did compile --with-pam. Although, the $PATH for the postgres user - who I used to compile with didn't have /lib and /lib64 in it's path. I don't see anything is configure.in or config.log to hint that pam isn't configured, but I'll re-configure anyway. Is there a way to check PAM is configured with postgresql? pam_unix2.so is located in /lib(64)/security. I was wondering if both /lib and /lib/security needed to be in the $PATH or if just /lib/security was needed. Also, forget about PAM for a minute. Why does ident work locally, but the host entry not work as easily?ident sameuser in host doesn't work for me. When I think about it though it makes sense. I'm coming in on pgadmin iii from a windows machine and a user logged into a windows domain. So, no wonder, it doesn't map right. It doesn't have any smith user logged in at the time. I've tried other combinations like a map name, user ident, pg user, but it doesn't work. ie TEST smith smith. And then TEST smith smith in the pg_ident.conf file. I really don't think postgresql is talking to our LDAP server. The only thing it can do is local (using the unix ldap setup). Thanks for all your insight, ~DjK -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dick Davies Sent: Sunday, January 16, 2005 4:11 AM To: PostgreSQL Admin Subject: Re: [ADMIN] PAM ldap * Kavan, Dan (IMS) [EMAIL PROTECTED] [0149 18:49]: Hi, I'm running postgresql 8.0.rc5 on SUSE. I have the pg_hba.conf file configured with local all smith ident sameuser host all smith ident sameuser The way authentication works with that is that configuration is that if I'm logged in as smith with my company ldap server I can get in, but if I'm not directly logged in as smith, I can't get in. Having the word pam in this file at all causes an error. I'd like to use pam so postgres could do it's own ldap/pam lookups, but I keep getting an error that it doesn't know what pam is. I see in the logs that the pam server starts, but I still get an error. You didn't show the broken config, but assuming it's something like # TYPE DATABASEUSERIP-ADDRESS IP-MASK METHOD hostsslall all 127.0.0.1 255.255.255.255 pam then perhaps you don't have pam support built into postgres? /etc/pam.d/postgresql authrequiredpam_unix2.sonullok account requiredpam_unix2.so This is going to do unix auth, obviously, so you'll need to s/unix/ldap/ on that... -- 'You may need to metaphorically make a deal with the devil. By 'devil' I mean robot devil and by 'metaphorically' I mean get your coat.' -- Bender Rasputin :: Jack of All Trades - Master of Nuns ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [ADMIN] PAM ldap
On Tue, Jan 18, 2005 at 11:56:25 -0500, Kavan, Dan (IMS) [EMAIL PROTECTED] wrote: Also, forget about PAM for a minute. Why does ident work locally, but the host entry not work as easily?ident sameuser in host doesn't Are you running an ident server? One needs to be running on the machine the client is connecting from. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [ADMIN] PAM ldap
* Kavan, Dan (IMS) [EMAIL PROTECTED] [0156 16:56]: Thanks for the reply, I did compile --with-pam. Although, the $PATH for the postgres user - who I used to compile with didn't have /lib and /lib64 in it's path. I don't see anything is configure.in or config.log to hint that pam isn't configured, but I'll re-configure anyway. Is there a way to check PAM is configured with postgresql? pam_unix2.so is located in /lib(64)/security. I was wondering if both /lib and /lib/security needed to be in the $PATH or if just /lib/security was needed. PATH isn't used for shared libs (/lib will be getting searched, or the machine probably wouldn't boot). There's a separate search path set for the dynamic linker to load shared libraries, but it's platform specific. (On a leenux you need to add the directory to /etc/ld.so.conf - or you did last time i used it (circa redhat 5.2 )) Or you could try setting LD_LIBRARY_PATH=/lib/security (that's a horrible hack, but it should work). If I was you I'd just add a --with-pam to your ./configure command line, and check config.log after that completes. To check this is your problem, try ldd - it tells you what shared libs a binary is linked against (and uses the search path I mentioned earlier). Mine shows (freebsd 5.3): [EMAIL PROTECTED]:rasputnik$ ldd `which postmaster` /usr/local/bin/postmaster: libintl.so.6 = /usr/local/lib/libintl.so.6 (0x28264000) libpam.so.2 = /usr/lib/libpam.so.2 (0x2826d000) libssl.so.3 = /usr/lib/libssl.so.3 (0x28274000) libcrypto.so.3 = /lib/libcrypto.so.3 (0x282a2000) libz.so.2 = /lib/libz.so.2 (0x28397000) libreadline.so.5 = /lib/libreadline.so.5 (0x283a7000) libcrypt.so.2 = /lib/libcrypt.so.2 (0x283d3000) libm.so.3 = /lib/libm.so.3 (0x283eb000) libutil.so.4 = /lib/libutil.so.4 (0x28405000) libc.so.5 = /lib/libc.so.5 (0x28411000) libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x284eb000) libncurses.so.5 = /lib/libncurses.so.5 (0x285d9000) Also, forget about PAM for a minute. Bye then (I know jack about ident)! -- 'My life, and by extension everyone else's, is meaningless.' -- Bender Rasputin :: Jack of All Trades - Master of Nuns ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[ADMIN] Using COPY for bulk upload in a table with sequence field
Hi: Can I use COPY command to upload a flat text file into a PG table where the PK column (item_id) is Serial type. The table is an existing table with data and I want to insert new rows from the flat file. The sequence already defined for this column. If I do not have the item_id data in my flat file, is it going to get the id from nextval from the sequence? Any help is appreciated. Gautam ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [ADMIN] run httpd and postgresql on different machines ?
Chuming Chen wrote: I want to set up a web site using apache httpd, php and postgresql. From the performance point of view, which architecture is better? 1) Run httpd and postgresql on the same machine; 2) Run postgresql on seperate machine. My concern is that the machine I am going to run httpd has limitted storage. I am expecting the increasing of postgresql database once I set it ip. I had good luck with 4 very cheap (small, used, 1CPU, IDE disk) machines running httpd/php/MONO-ASP.NET, and 1 more expensived machine (with some internal failover capabilities - dual power supplies, with a RAID array, with a support contract) running postgresql. The reasoning was one of cost/performance with the ability to have likely-to-fail components fail with no downtime. The cheapest way to scale the front-end machines with failover capabilities was to use sub-$1000 slightly obsolete PCs. The cheapest way I knew to provide limited scalability and failover (at least for disk) for a database was a raid array. With some of the newer replication features or pgpool, it might be easier to scale out instead of up; but I have no experience making that determination. How about the rest of you guys If CPU demands in my database get to the point of needing 5-CPUs with a read-mostly (90%) system, am I better off with 1 lots of replication between small servers or 2 scaling up a big server. (the reason I'm CPU bound instead of disk bound is that many of my queries are spatial operations with PostGIS like unions and buffers of polygons). ---(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] Using COPY for bulk upload in a table with sequence field
On Tue, Jan 18, 2005 at 05:43:51PM -0600, Gautam Saha wrote: Can I use COPY command to upload a flat text file into a PG table where the PK column (item_id) is Serial type. What does the documentation say? What happened when you tried it? It can be educational to practice on test data so mistakes don't matter. And when changing real data, consider using a transaction so you can verify that the changes are correct: issue a BEGIN statement, then make the changes, then issue enough SELECT statements to satisfy you that the changes are correct, then issue a COMMIT. If the changes don't look right then do a ROLLBACK. Here's an excerpt from the COPY page in the Reference part of the documentation: If a list of columns is specified, COPY will only copy the data in the specified columns to or from the file. If there are any columns in the table that are not in the column list, COPY FROM will insert the default values for those columns. Here's an experiment: CREATE TABLE foo (id serial PRIMARY KEY, name text); INSERT INTO foo (name) values ('John'); INSERT INTO foo (name) values ('David'); SELECT * FROM foo ORDER BY id; id | name +--- 1 | John 2 | David (2 rows) COPY foo (name) FROM stdin; James Robert \. SELECT * FROM foo ORDER BY id; id | name + 1 | John 2 | David 3 | James 4 | Robert (4 rows) -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html