Re: [ADMIN] Fw: lo_import problem
ok...jeff thank you very much. I checked in pg_hba.conf and reloaded again and did now working fine. - Original Message - From: "Jeff Frost" <[EMAIL PROTECTED]> To: "sandhya" <[EMAIL PROTECTED]> Cc: "Postgres" Sent: Thursday, January 19, 2006 1:13 PM Subject: Re: [ADMIN] Fw: lo_import problem > This worked fine for me on a freshly installed 8.0.3 on Windows XP: > > pics=# INSERT into images VALUES ( lo_import('C:\\Program Files\\PostgreSQL\\8.0\\Installation Notes.rtf'), 'notes'); > > "could not open server file" means that either the file does not exist, or the > user you are trying to access the file as does not have the rights to read it. > > Again, check your permissions as I mentioned to you earlier. > > On Wed, 18 Jan 2006, Jeff Frost wrote: > > > This is what works for me from the command line on Linux with PG 8.0.3: > > > > INSERT into images VALUES ( lo_import('/tmp/white.jpg'), 'white'); > > > > What version of postgresql are you using? > > > > On Thu, 19 Jan 2006, sandhya wrote: > > > >> > >> > >> > >> When i am using lo_import to load files into the database i am getting the > >> following error. > >> Please help me what i need to do > >> > >> Insert into sampletbl values(lo_import('c:\\sample.txt'),'sample.txt'); > >> > >> ERROR: function lo_import ("unknown") does not exist > >> HINT: No function matches the given name and argument types. You may need > >> to ad > >> d explicit type casts. > > > > > > -- > Jeff Frost, Owner <[EMAIL PROTECTED]> > Frost Consulting, LLC http://www.frostconsultingllc.com/ > Phone: 650-780-7908 FAX: 650-649-1954 > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend > ---(end of broadcast)--- TIP 1: 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] effects of cancelling a vacuum full
One Question out of curiosity .. How did u cancel the vacuum full ?. 1. killed the process id .. eg using kill -9 2. canceled the vacuum full from command prompt eg using "ctrl C". 3. or did an immediate shutdown . On 1/18/06, Scott Marlowe <[EMAIL PROTECTED]> wrote: On Wed, 2006-01-18 at 12:17, Anjan Dave wrote:> Hi,>> I just had to cancel one VACUUM FULL (of a 4.3m row table) that someone ran in business hours. It was after an hour or so that I realized, and it was blocking queries, running out of connections, so I cancelled it. Are there any bad side effects of cancelling an ongoing full vacuum of a table or a database? Does a partial full vacuum give back any space? >No damage done.No space returned.Just wait and run it again later.Tell your used to do a vacuum regular during business hours or you'llhave to give him a stern talking to.---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match-- Best, Gourish Singbal
[ADMIN] WAL log archive frequency
Hi, Further to my question on PITR, I have now implemented it :-) However, I was wondering about the frequency of archiving the WAL. Does postgresql wait until the current WAL file has reached 16MB before calling the archive_command? The reason why I ask is that last night, after doing the base backup, I noticed that a WAL file had been written to my backup server. This morning, I added a primary key to a table but noticed that nothing was written to the backup server. Should it have been? Is there any method of forcing a WAL segment to be archived at a given frequency irrespective of whether or not it is a full 16MB? Our database changes so infrequently at the moment that I'm worried that these small changes may not be backed up regularly by the PITR system. Thanks, Chris -- Chris Jewell, BSc(Hons), BVSc, MRCVS Dept of Maths and Statistics Fylde College Lancaster University Lancaster Lancs LA1 4YF ---(end of broadcast)--- TIP 6: explain analyze is your friend
[ADMIN] Distributed database with postgres
Hello, First of all, sorry about my english. I'm searching a tool for implementing a distributed DB in postgres. I've found "pgreplicator" (http://pgreplicator.sourceforge.net/). I figure out that the last revision of the project was in 2001, and I don't know if the project goes on. I have not tested pgreplicator yet, but I would know what do you think about this software (if you know it) or other ones that give you the way for mounting a distributed DB. I have found Slony, but it is a master / slave replication system, and I think it cannot works as a pure distributed DB. By other way, what do you think about the state of the distributed DB tools for postgres ? What distributed DB tools for postgres exist ? Are matures ? What are their fails ? Thank you very much. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [ADMIN] WAL log archive frequency
Chris Jewell <[EMAIL PROTECTED]> writes: > Further to my question on PITR, I have now implemented it :-) However, > I was wondering about the frequency of archiving the WAL. Does > postgresql wait until the current WAL file has reached 16MB before > calling the archive_command? Yes. The assumption is the archive_command may be too stupid to deal with archiving the same file more than once, and/or might have performance issues with doing that, eg, if it's writing to tape or some kind of write-once media. You can do something like saving the newest-by-timestamp file in the xlog directory every minute or whatever via a cron job. This ought to be better integrated though ... regards, tom lane ---(end of broadcast)--- TIP 1: 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
[ADMIN] Why psql.exe does not work?
Hello, I have done a silent installation, the installation worked eventually, and I can use pgAdmin interface to connect to it. However I have problem using psql.exe to connect to the database. I need to create a database called delphie from command line. It should be a part of the installation I'm working on. I used the follwing commands psql.exe -U root but it keeps giving me: psql: FATAL: password authentication failed for user "root" root is the supper user and the password is also root, but not only the program does not prompt for password but also there is no way that I can supply a password through the command line. The ultimate goal is I need to create a database automatically without user interacation. I have a sql script that I need to run to create the tables. I have used Oracle without problems before but not sure how to approach with Postgres. Any help/tip is greatly appreciaged. Sean ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
[ADMIN] Transferring DATA directory
Hi, I'm trying to transfer large amounts of data between two PostgreSQL 8.1.2 database Windows XP platforms using the physical filesystem backup method. I used the same PostgreSQL installer on both machines and the same PostgreSQL configuration. I also used default options with PostGIS options. I did the following: 1. shut down the database on each of machine A and machine B, 2. zipped up the \DATA directory on machine A and unzipped it onto machine B. 3. when I started up PostgreSQL on machine B with machine A's data directory, the following message is returned: "The PostgreSQL Database Server 8.1 service could not be started. The service did not report an error. More help is available by typing NET HELPMSG 3534" I'm trying not to transfer data using pg_dump as it's quite a lot of data and highly time consuming. Does anyone know if this is possible. I've verified that there is no .pid file in the DATA directory. Are there other files I am missing? Anything else I might try? Thanks, Alfred Lau
[ADMIN] Trouble installing on XP home
I'm trying to install postgresql on my laptop, windows XP home edition sp2. can't install as a service: I either have too much permission or not enough... Here are the steps I performed and the generated messages: 1)I ran the install program (postgresql-8.1) the data directory chosen is a folder located in a NTFS logical drive (F:\PostgreSQL\), the remainder of the drive being of FAT type. error message: "Failed to run initdb: 1!" the initdb log reads as follows: The files belonging to this database system will be owned by user "postgresusr". This user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory F:/PostgreSQL ... initdb: could not change permissions of directory "F:/PostgreSQL": Permission denied 2) I ran the install again, but this time uncheck 'install as service' I opened a Command Prompt and executed the following: cd \program files\postgresql\8.1\bin initdb --locale=C --username=postgres -W -A md5 -E UNICODE -D f:\postgresql I get the following: The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory f:/postgresql ... ok creating directory f:/postgresql/global ... ok creating directory f:/postgresql/pg_xlog ... ok creating directory f:/postgresql/pg_xlog/archive_status ... ok creating directory f:/postgresql/pg_clog ... ok creating directory f:/postgresql/pg_subtrans ... ok creating directory f:/postgresql/pg_twophase ... ok creating directory f:/postgresql/pg_multixact/members ... ok creating directory f:/postgresql/pg_multixact/offsets ... ok creating directory f:/postgresql/base ... ok creating directory f:/postgresql/base/1 ... ok creating directory f:/postgresql/pg_tblspc ... ok selecting default max_connections ... 10 selecting default shared_buffers ... 50 creating configuration files ... ok creating template1 database in f:/postgresql/base/1 ... Execution of PostgeSQL by a user with administrative permissions is not permitted. The server must be started under an unpriviledged user ID to prevent possible system security compromises. See the documentation for more information on how to properly start the server. child process was terminated by signal 1 initdb: removing contents of data directory "f:/postgresql" --- 3)so I try the following command: runas /user:postgres cmd then run initdb again as previously and get the following: --- The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory f:/postgresql ... initdb: could not change permissions of directory "F:/PostgreSQL": Permission denied' --- I had no trouble installing on Win XP Pro on my desktop, but am stumped on XPhome. Can anyone push me in the right direction? Thanks for your time :-)Dave -- ___ Play 100s of games for FREE! http://games.mail.com/ ---(end of broadcast)--- TIP 6: explain analyze is your friend
[ADMIN] Need help in installing postgresql 8.1.2 on Windows
Sir I am trying to install Globus Toolkit4 on Windows machine. Postgresql8.1.2 is required software for installing GT4. But i cant get installation steps from anywhere.. Please help me and do reply Thanks Sarvjot Yahoo! Photos Got holiday prints? See all the ways to get quality prints in your hands ASAP.
Re: [ADMIN] [GENERAL] Problem with restoring database from 7.3.1 to 8.0.1
Hi Tom, thanks for your answer. I did some testing now but still have the same problem. Tom Lane wrote: > Kai Hessing <[EMAIL PROTECTED]> writes: >> [DB-Problem] > > Hmm. This looks like a pg_dump bug, ie, issuing ALTER OWNER commands > for the wrong index name (or, perhaps, issuing them before having > created the index ... do you use any indexes named like that?). > > Which pg_dump version did you use to make the dump? The usual > recommendation is to use the newer version's pg_dump in this sort > of situation. The whole thing is a little bit strange because the indexes doesn't really seem to exist. For example the error: pg_restore: [Archivierer (DB)] Fehler in Inhaltsverzeichniseintrag 114; 0 5901799 CONSTRAINT usertypeid mh1004 pg_restore: [Archivierer (DB)] could not execute query: FEHLER: Relation »public.usertypeid« existiert nicht Command was: ALTER INDEX public.usertypeid OWNER TO mh1004; There is no index called 'public.usertypeid'. The index name is 'public.auth_usertype_pkey ' and references the row 'usertypeid' in table 'auth_usertype'. So it might be a pg_dump bug. And I do not understand the sense of this ALTER command because the whole db and everything in it belongs already to user mh1004. But the dump worked perfectly fine at our old testmachine with 7.4.x, so I'm not sure if it's really pg_dump producing the error. The pg_dump Version is the same like the database: 7.3.2. I am not able to update postgres on this server (see below). So how may I upgrade just the pg_dump? > BTW, you should *not* be updating to 8.0.1. 8.0.6 is the latest release > in that series. It is almost never a good idea to be running anything > but the latest minor release in a series. (The fact that you're still > on 7.3.1 doesn't speak well for your attentiveness to updates either. > We don't make minor releases just to keep busy, you know.) You're perfectly right. Just to explain: Test server: It was a fresh Suse 9.3 install and after my assistant told me that postgres is running, I tried the import. Now it's patched to 8.0.3. It is still not the newest one, but Suse doesn't seem to provide a newer precompiled version for their distribution yet. Production system: It is a 7.3.2 (my mistake) and it is hosted externally. Maybe it's something about debian and stable and so on. But it doesn't matter anymore, because I think we're switching to a new provider soon and actual patches are part of the contract. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[ADMIN] killing a query safely
Hi, many a times the backend are stubborn. A backend is currently executing a Query , the query usually finishes quickly < 5 secs. But this query is on for past many minutes. I want to debug why it is hung if it is hung. I have also tried to kill this query using following methods: SQL> SELECT pg_cancel_backend(27649); # does not kill # kill 27649 # does not kill # kill -TERM 27649 # does not kill # ps auxwww| grep 27649 postgres 27649 0.0 1.9 421060 81576 ? S 10:41 0:00 postgres: tradein tradein_clients 216.247.238.131(59261) SELECT this query does not block any other tradein_clients=# SELECT * from blockers; +-+-+ | blocker | blockee | +-+-+ +-+-+ (0 rows) \d blockers View "public.blockers" +-+-+---+ | Column | Type | Modifiers | +-+-+---+ | blocker | integer | | | blockee | integer | | +-+-+---+ View definition:(Courtesy: Tom Lane) SELECT h.pid AS blocker, w.pid AS blockee FROM ONLY pg_locks h, ONLY pg_locks w WHERE h."granted" AND NOT w."granted" AND (h.relation = w.relation AND h."database" = w."database" OR h."transaction" = w."transaction"); Can anyone please guide what should be done in such situations. Regds mallah. -- Best Regards, regds Mallah. Rajesh Kumar Mallah +---+ | Tradeindia.com (3,97,300) Registered Users | | Indias' Leading B2B eMarketPlace | | http://www.tradeindia.com/ | +---+
[ADMIN] Question
Hi. I want to find out if postgresql can be used in place of MS SQL? But I want to find out if I can get SharePoint working on postgre with out any limitations. I was given the task to see if there is any other DB that we can run share point on. I don’t want to try for months and then find out that it can’t be done. So if you guys can just give me a answer on this, it will be great. Thanks for your help and keep the good work going.. Regards Chris
Re: [ADMIN] Question
On Thu, 2006-01-19 at 09:59, Chris Van Reenen wrote: > Hi. > > > > I want to find out if postgresql can be used in place of MS SQL? > > But I want to find out if I can get SharePoint working on postgre with > out any limitations. > > I was given the task to see if there is any other DB that we can run > share point on. > > I don’t want to try for months and then find out that it can’t be > done. > > So if you guys can just give me a answer on this, it will be great. > > Thanks for your help and keep the good work going.. Microsoft makes and sells both of those products, so it's unlikely that they'll make the database easily replaceable, as forcing you to use MS SQL server ensures they get maximum income from SharePoint. I'm not saying it won't work. Just that even if you do get it to work, it's likely to have some problems here and there. PostgreSQL is NOT a direct replacement for MS SQL server, and it's not uncommon for someone to write code that uses some artifact of MS SQL that no other database supports. If your boss wants to run SharePoint, I'd suggest running MS SQL underneath it. Of course, I'd recommend not running either, having had experience with both in the past. But that's just me. ---(end of broadcast)--- TIP 1: 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] Distributed database with postgres
On Thu, Jan 19, 2006 at 03:46:25PM +0100, Juan Miguel wrote: > Hello, > > First of all, sorry about my english. I'm searching a tool for > implementing a distributed DB in postgres. I've found "pgreplicator" > (http://pgreplicator.sourceforge.net/). I figure out that the last > revision of the project was in 2001, and I don't know if the project > goes on. > > I have not tested pgreplicator yet, but I would know what do you think > about this software (if you know it) or other ones that give you the way > for mounting a distributed DB. > > I have found Slony, but it is a master / slave replication system, and I > think it cannot works as a pure distributed DB. > > By other way, what do you think about the state of the distributed DB > tools for postgres ? > What distributed DB tools for postgres exist ? > Are matures ? > What are their fails ? Currently your only options for multi-master OSS replication are all based on query replication, which has some very serious drawbacks (ie: how do you deal with now()). Your best bet is probably to wait for Slony-2; it sounds like it's pretty much exactly what you'd want, unless you need to support remote, disconnected clients, which I don't think it will handle well. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [ADMIN] killing a query safely
Rajesh Kumar Mallah <[EMAIL PROTECTED]> writes: > many a times the backend are stubborn. A backend is currently > executing a Query , the query usually finishes quickly < 5 secs. > But this query is on for past many minutes. I want to debug why > it is hung if it is hung. Attach to the backend process with gdb and get a stack trace --- that would at least give us some information to work with. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [ADMIN] WAL log archive frequency
Tom Lane wrote: > Chris Jewell <[EMAIL PROTECTED]> writes: > > Further to my question on PITR, I have now implemented it :-) However, > > I was wondering about the frequency of archiving the WAL. Does > > postgresql wait until the current WAL file has reached 16MB before > > calling the archive_command? > > Yes. The assumption is the archive_command may be too stupid to deal > with archiving the same file more than once, and/or might have > performance issues with doing that, eg, if it's writing to tape or some > kind of write-once media. > > You can do something like saving the newest-by-timestamp file in the > xlog directory every minute or whatever via a cron job. This ought to > be better integrated though ... FYI, this is documented. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (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 5: don't forget to increase your free space map settings
[ADMIN] "Blueprints for High Availability"
Wiley Press, ISBN 0-471-43026-9, Even Marcus & Hal Stern Whatever you do, don't read this book when planning your enterprise-class PostgreSQL cluster using Slony1. The author(s) give a scathing opinion of network based asynchronous database replication. Especially for redundant configurations within the same facility. They concede that the method has some applicable uses (facility to facility replication), but they go so far as to recommend long distance SAN before software+network. The entire text has a highly anti-microsoft undercurrent which makes it a real page-turner, unfortunately, most of the advice regarding HA application clusters has a commercial-UNIX oriented slant (they all but endorse VERITAS). The book only serves to further emphasize that there is no definitive FMS (Fail over Management Software) solution for Open Source UNIX-like OSs. No true platform-independent (well, Linux-HA[.org]) project that integrates with monitoring, databases, web servers, load balancers, RAID / SAN controller, etc. The projects are there (PostgreSQL, Slony, PGPool, Nagios, Net-SNMP, FreeVRRPd, FreeBSD, GNU/Linux, Linux-HA, etc..), there just no integration yet. ~BAS ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [ADMIN] "Blueprints for High Availability"
Bas, I am working on an integration technique that solves these problems and is already showing tremendous promise. It's in production use in a very high pressure environment but suffice to say it's an integration of what's out there (I am 100% Linux based so don't expect anything but Linux). Once it is completed and I feel that I can present it to a wider audience such as this one, I will formally announce it and seek a peer review process. But let's just say that it is possible, RIGHT NOW, to get full redundancy and failover that works, it OpenSource and runs on cheap hardware. Brian A. Seklecki wrote: Wiley Press, ISBN 0-471-43026-9, Even Marcus & Hal Stern Whatever you do, don't read this book when planning your enterprise-class PostgreSQL cluster using Slony1. The author(s) give a scathing opinion of network based asynchronous database replication. Especially for redundant configurations within the same facility. They concede that the method has some applicable uses (facility to facility replication), but they go so far as to recommend long distance SAN before software+network. The entire text has a highly anti-microsoft undercurrent which makes it a real page-turner, unfortunately, most of the advice regarding HA application clusters has a commercial-UNIX oriented slant (they all but endorse VERITAS). The book only serves to further emphasize that there is no definitive FMS (Fail over Management Software) solution for Open Source UNIX-like OSs. No true platform-independent (well, Linux-HA[.org]) project that integrates with monitoring, databases, web servers, load balancers, RAID / SAN controller, etc. The projects are there (PostgreSQL, Slony, PGPool, Nagios, Net-SNMP, FreeVRRPd, FreeBSD, GNU/Linux, Linux-HA, etc..), there just no integration yet. ~BAS ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 1: 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
[ADMIN] unsubscribe
unsubscribe HI,你 用 过 网 易 相 册 批 量 上 传 工 具 吗 ?想 传 多 少 就 传 多 少 ,还 是 免 费 的!