[HACKERS] Hot standby off of hot standby?
Hi, Is it possible to use a standby instance as a master/primary for another standby in Postgres 9.0? In other words, does PG 9.0 supports cascading standby configuration? Thanks, Igor
[HACKERS] New Platform
Gentlemen, I found this link in PostgreSQL 9 Documentation and we are moving to a different platform Could you please help me with the instruction of how to install the new version of PostgreSQL 9 on SUSE Linux Enterprise Server v.10. Thanks, Igor G.
[HACKERS] INSERT and parentheses
Marko et al, This is my first ever attempt of a patch review just for learning the procedure. I'm not a postgres developer, so the review is partial and mostly from the usability prospective. The original message id of the patch is 4bd58db3.4070...@cs.helsinki.fihttp://archives.postgresql.org/pgsql-hackers/2010-04/msg01200.php Submssion review = * Is he patch in context diff format? Ys * Dos it apply cleanly to the current CVS HEAD? Applies cleanly to a source code snapshot * Dos it include reasonable tests, necessary doc patches, etc? I does not require a doc patch. A test is not included, but it looks pretty trivial: -- Prpare the test tables drop table if exists foo; drop table if exists boo; crate table foo( a nt, b nt, c nt); crate table boo( a nt, b nt, c nt); insert into boo values (10,20,30); -- Actual test INSERT INTO foo(a,b,c) SELECT (a,b,c) FROM boo; INSERT INTO foo(a,b,c) VALUES((0,1,2)); Usability Review = The patch provides a HINT for unclear error. This should clarify for a user what exactly is wrong with the sql. However, the actual HINT text provided with the patch is not very clear, too. The Stephen Frost's suggestion would add clarity: errhint(insert appears to be a single column with a record-type rather than multiple columns of non-composite type.), Feature test = The feature works as advertised for the test provided above. No failures or crashes. No visible affect on performance
Re: [mail] Re: [HACKERS] Windows Build System
- Original Message - From: Justin Clift [EMAIL PROTECTED] To: Curt Sampson [EMAIL PROTECTED] Cc: Peter Eisentraut [EMAIL PROTECTED]; Curtis Faith [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, February 02, 2003 4:42 AM Subject: Re: [mail] Re: [HACKERS] Windows Build System + It would be greatly helpful to have some way for the install program to automatically add the Log in as a service Win32 priviledge to the postgres user without having to instruct the user to do so. We can create the user automatically through a shell command, but no idea how to add that permission. If someone could do some Win32 API stuff to do it behind the scenes without a shell command even, that would be great. + The WinMaster project is a first go at creating a Win32 GUI command console for controlling the PostgreSQL service. It's still a bit too basic for real use though: http://gborg.postgresql.org/project/winmaster/projdisplay.php Further suggestions, volunteers, etc are totally welcome. :-) Regards and best wishes, Justin Clift It's still a bit too basic for real use though: Yeah i know. I write this for my internal use. Initial purpose of this stuff is only to avoid teaching of an old lady with minimum computer skills to use bash and hide this ugly dos box :) Mark L. Woodward (mlw) anounce few monts ago a self installing PostgreSQL for Windows so i write him about this console. He do a lof job to. Special thanks Mark. OK, now how to make WinMaster more usefull ? It's open source so if any1 want use it he/she may help to develop it. I. Install as a service feature for winmaster are included in my plans for future. II.I'm thinking about direct link to PostgreSQL server instead usung CreateProcess, but this is unclear idea at present time. Any suggestions will be welcome. IIIPlease add any feature rquests to http://gborg.postgresql.org/project/winmaster/bugs/buglist.php?fr=yes and ideas to mailto:[EMAIL PROTECTED] Justin you are right !!! Further suggestions, volunteers, etc are totally welcome!!! Further suggestions, volunteers, etc are totally welcome!!! Further suggestions, volunteers, etc are totally welcome!!! --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [HACKERS] [mail] Re: Win32 port patches submitted
http://www.janwieck.net/win32_port/notes.win32-ports.txt How to compile this Win32 port 1) Requirements and 1-time settings: 1.1) Visual C++ You need VC++ 6.0 on ServicePack 5. Oooh no, not MS stuff plz :( Dev-Cpp is cool open source IDE, tha using a mingw port of gcc. http://www.bloodshed.net/ - Original Message - From: Jan Wieck [EMAIL PROTECTED] To: Emmanuel Charpentier [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 1:03 AM Subject: Re: [HACKERS] [mail] Re: Win32 port patches submitted Emmanuel Charpentier wrote: Mingw and mingw-ported tools ? That's a nice small and cozy unix-like envoronment on tom of Windows. Add it emacs, and windoww becomes almost tolerable ... How good is the debugging support under mingW? Is it at least comparable to using gdb under unix? If not, you might find yourself all of the sudden out in cold ... Jan ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] [GENERAL] PostgreSQL Global Development Group
- Original Message - From: Devrim GÜNDÜZ [EMAIL PROTECTED] To: PostgreSQL-development [EMAIL PROTECTED] Sent: Saturday, December 14, 2002 4:58 PM Subject: Re: [HACKERS] [GENERAL] PostgreSQL Global Development Group Also, I have something to say about win32 port. I'm a Linux user. I'm happy that PostgreSQL does not have win32 version. If someone wants to use a real database server, then they should install Linux (or *bsd,etc). This is what Oracle offers,too. Native Windows support will cause some problems; such as some dummy windows users will begin using it. I do not believe that PostgreSQL needs native windowz support. Ooops. I'm a Linux user too, but i have a SCO Openserver, UnixWare, Netware and lot of windows boxes in my office. Also I have Informix, Sybase ... etc. This isn't for my entertainment. Our customers need to use a real database server. But what about small business? A lot of our small customers can't spent money for dedicated linux box :((( I spent 2 month in trying open source databases (PostgreSQL, SAP DB, Interbase/Firebird) finaly i choose PostgreSQL. Now we port one of our products from Sybase SQL Anywhere to PostgreSQL. We have more than 100 customers with small networks (2-10). Most of them cant't aford dedicated linux box. Another situation DHL Bulgaria and TNT Worldwide Express Bulgaria are our customers too. In HQ they choose windows nt (i don't comment how smart is this decision), pay a lot of money to mr.Gates and now what - we say PostgreSQL is great , but .. ( and i have personal contacts with their sysadmins i don't believe they are dummy windows users) So if you don't want windows support just don't use it! ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[HACKERS] Postmaster windows shell
- Original Message - From: mlw To: Igor Georgiev Cc: [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 6:52 PM Subject: Re: Shrinkwrap Windows Product, any issues? Anyone? (postmaster windows shell) Hey this is a cool project. I have been thinking doing the exact ame thing, the console Window of 2K/XP just kills the daemon, yuck.What can I do to help? - Original Message - From: "Justin Clift" [EMAIL PROTECTED] To: "Igor Georgiev" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 11:32 PM Subject: Re: [HACKERS] Shrinkwrap Windows Product, any issues? Anyone? (postmaster windows shell) Hi Igor, This would be a really good thing to get into GBorg as a project, so people could work on this through CVS. Would you like to register it as a project? Mark, do you feel it would be better to put your installer plus this together into one project on GBorg too? Not sure, it's just a thought. Was [Re: Shrinkwrap Windows Product, any issues? Anyone? (postmaster windows shell)] Justin : Current active projects: Project Role winmaster(awaiting approval) Admin WinMaster - windows console for PostgreSQL mlw: I am working on a HOWTO, a set of Windows batch files, and the install scripts I would be glad to post, and I would be very glad to include Igor's console in the install. It would make a cool offering. Its Ok 4 me. Unfortunately i havent Windows 2K/XP so i can't test it :(. I can send u source if u wish.
Re: [HACKERS] Postmaster windows shell
- Original Message - From: Igor Georgiev To: mlw Sent: Friday, December 06, 2002 4:57 PM Subject: Re: Postmaster windows shell - Original Message - From: "mlw" [EMAIL PROTECTED] To: "Igor Georgiev" [EMAIL PROTECTED] Sent: Friday, December 06, 2002 3:43 PM Subject: Re: Postmaster windows shell Yea, send it. Is it GPL? I justreceive approvalfrom gborg. This project is released under the Mozilla Public License (MPL). http://gborg.postgresql.org/project/winmaster/projdisplay.php but with my zero expirience with cvs i dont upload nothing yet :((( any help be welcome :) hereis raw source with Dev-C++ project Does it compile under cygwin or MSC? (I have both) mingw, but i thin it will run wtoh -mno-cygwin
Re: [HACKERS] Shrinkwrap Windows Product, any issues? Anyone? (postmaster windows shell)
I am working on getting a shrink-wrapped version of PostgreSQL for WindowsCurrently it installs a customized version of Cygwin, PostgreSQL 7.2.3, cygipc, psqlodbc, and pgadminIII currently have the setup done. Cool :) I'm now working on postmaster windows shell. It's not finished yet but main things work. Funcionality implemented now is : Console redirection for capture output from postmaster Starting-stoping postmaster Choose for shutdown mode System tray icon Postmaster options are read from registry -postmaster path -datadir -additional options Funcionality not implementedyet, but planned: Writing captured output from postmaster to log file Options setup dialog Edit pg_hba.conf ??? Application is MFC free pure windows API (compiler:gcc-mingw, Dev-C++ IDE) . Here is the screenshot I also be GLAD to read about plans for native windows port in 7.4. If anyone is interested i can post source code, or maybe this firrst steps can go to gborg as a separate project i'm not sure yet. PS: Excuse me for my english, I'm better in C :)
Re: [HACKERS] 7.4 Wishlist
Native Windows port Plz don't forget poor victims of Microsoft !!!
Re: [HACKERS] Security question : Database access control
Next your going to ask what will stop root from stopping your PostgreSQL, compiling a second copy with authentication disabled and using your data directory as it's source :) He he somebody can blow up ur home with C4, but this don't stop you from locking ur door !?! ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[HACKERS] Security question : Database access control
Is there any way to prevent superuser to acces the database ? I mean something like "GRANT / REVOKE CONNECT" MECHANISM I have no idea how to prevent root from access data in one of this ways : root @ linux:~#su - postgres postgres @ linux:/usr/local/pgsql/bin$pg_dump or edit pg_hba.conf # Allow any user on the local system to connect to any # database under any username, but only via an IP connection: host all 127.0.0.1 255.255.255.255 trust # The same, over Unix-socket connections: local all trustor my nightmare a cygwin on Win 98 everybody can can access everything :-
Re: [HACKERS] Security question : Database access control
edit *pg_hba.conf * # Allow any user on the local system to connect to any # database under any username, but only via an IP connection: host all 127.0.0.1 255.255.255.255 trust # The same, over Unix-socket connections: local all trust what about reading pg_hba.conf comments? local all md5 Ok, but my question actually isn't about pg_hba.conf comments, i read enough but what will stop root from adding this lines or doing su - postgres ??
Re: [HACKERS] [ADMIN] Security question : Database access control
They can just read the raw database files as well. wow I'm not sure how about this edit pg_hba.conf # Allow any user on the local system to connect to any # database under any username local all trust su - posgres psql test -U dba or pg_dump test You have to be able to trust whoever has root access to the system, as well as anyone who has physical access to the system.
Re: [HACKERS] Security question : Database access control
Next your going to ask what will stop root from stopping your PostgreSQL, compiling a second copy with authentication disabled and using your data directory as it's source :) He he i'm enough paranoic :)) If you want to prevent root from accomplishing these things, you're going to have to look to your kernel for help. The kernel must prevent root from changing users, starting / stopping applications, or touching certain filesystems. PostgreSQL will let you put a password on the data. But that only works if they actually try to use PostgreSQL to get at the data. use PostgreSQL to get at the data -Yeah this will be enough i want just only REVOKE CONNECT PRIVILEGES on database
[HACKERS] COPY FROM recognize \xDD sequence - addition to copy.c idea 4 developers
1. Why i do this: I try to migrate a database with a 200 tables from Sybase SQL Anywhere to PostgreSQL, but SQL Anywhere escapes special characters like a HEX values ( like \x0D \x2C . ). PostgreSQL COPY FROM recognize only OCT values ( lie \001 ... ) 2. How-to it' easy :))) 2.1 - Open $UrSourceDir/src/backend/commands/copy.c 2.2 - Add #include ctype.h in te begining 2.3 find function static char * CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline, char *null_print) /**/ /* Add this code before it */ static int HEXVALUE( int c ) { if (isdigit(c)) { c -= '0'; } else { if (islower(c)) c= c-'a'+10; else c= c-'A'+10; } return(c); } 2.4 in body of CopyReadAttribute find this code and modify it like this if (c == '\\') { c = CopyGetChar(fp); if (c == EOF) goto endOfFile; switch (c) { /*-- Here is my additional code --*/ case 'x': case 'X': { int val; CopyDonePeek(fp, c, true /*pick up*/); /* Get x always */ c = CopyPeekChar(fp); /* Get next */ if (isxdigit(c)) { val = HEXVALUE(c); c = CopyPeekChar(fp); if (isxdigit(c)) { val = (val 4) + HEXVALUE(c); CopyDonePeek(fp, c, true /*pick up*/); } else { if (c == EOF) goto endOfFile; CopyDonePeek(fp, c, false /*put back*/); } } else { if (c == EOF) goto endOfFile; CopyDonePeek(fp, c, false /*put back*/); } c = val; } break; /*--End of myadditional code --*/ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': { int val; val = OCTVALUE(c); 2.4 he he now make , make install 3. An idea to developers : maybe u include this addition to COPY in future releases 10x P.S. Excuse me for my English ( i'm better in C :)
Re: [HACKERS] Native Win32/OS2/BeOS/NetWare ports
Hello together i've seen a lot of discussion about a native win32/OS2/BEOS port of PostgreSQL. During the last months i've ported PostgreSQL over to Novell NetWare and i've changed the code that I use pthreads instead of fork() now. I had a lot of work with the variables and cleanup but mayor parts are done. I would appreciate if we could combine this work. Very nice... I have patches for QNX6 which also involved redoing shared memory and sempahores stuff. It would make very good sense to intergate, especially since you managed to do something very close to what I wanted :) My plan was to finish this port, discuss the port with other people and offer all the work to the PostgreSQL source tree, but now i'm jumping in here because of all the discussions. What i've done in detail: - i've defined #USE_PTHREADS in pg_config.h to differentiate between the forked and the threaded backend. - I've added several parts in postmaster.c so all functions are based on pthreads now. - I've changed the signal handling because signals are process based Careful here. On certain systems (on many, I suspect) POSIX semantics for signals is NOT default. Enforcing POSIX semantics requires certain compile time switches which will also change behavior of various functions. - I've changed code in ipc.c to have a clean shutdown of threads - I've written some functions to switch the global variables. The globals are controled with POSIX semaphores. - I've written a new implementation of shared memory and semaphores- With pthreads I don't need real shared memory any more and i'm using POSIX semaphores now POSIX semaphores for what? I assume by the conext that you're talking about replacing SysV semaphores which are used to control access to shared memory. If that is the case, POSIX semaphores are not the best choice really. POSIX mutexes would be okay, but on SMP systems spinlocks (hardware TAS based macros or POSIX spinlocks) would probably be better anyway. Note that on most platforms spinlocks are used for that and SysV semaphores were just a 'last resort' which had unacceptable performance and so I guess it was not used at all. Do you have your patch somewhere online? -- igor ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [HACKERS] Roadmap for a Win32 port
I might be naive here, but would not proper threading model remove the need for fork() altogether? On both Unix and Win32? Should not be too hard to come up with abstraction which encapsulates POSIX, BeOS and Win32 threads... I am not sure how universal POSIX threads are by now. Any important Unix platforms which don't support them yet? This has downside of letting any bug to kill the whole thing. On the bright side, performance should be better on some platforms (note however, Apache group still can't come up with implementation of threaded model which would provide better performance than forked or other models). The need to deal with possibility of 'alien' postmaster running along with orphaned backends would also be removed since there would be only one process. Issue of thread safety of code will come up undoubtedly and some things will probably have to be revamped. But in long term this is probably best way if you want to have efficient and uniform Unix AND Win32 implementations. I am not too familiar with Win32. Speaking about POSIX threads, it would be something like a thread pool with low high watermarks. Main thread would handle thread pool and hand over requests to worker threads (blocked on condvar). How does that sound? -- igor - Original Message - From: Bruce Momjian [EMAIL PROTECTED] To: PostgreSQL-development [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 11:33 PM Subject: [HACKERS] Roadmap for a Win32 port OK, I think I am now caught up on the Win32/cygwin discussion, and would like to make some remarks. First, are we doing enough to support the Win32 platform? I think the answer is clearly no. There are 3-5 groups/companies working on Win32 ports of PostgreSQL. We always said there would not be PostgreSQL forks if we were doing our job to meet user needs. Well, obviously, a number of groups see a need for a better Win32 port and we aren't meeting that need, so they are. I believe this is one of the few cases where groups are going out on their own because we are falling behind. So, there is no question in my mind we need to do more to encourage Win32 ports. Now, on to the details. INSTALLER - We clearly need an installer that is zero-hassle for users. We need to decide on a direction for this. GUI --- We need a slick GUI. pgadmin2 seems to be everyone's favorite, with pgaccess on Win32 also an option. What else do we need here? BINARY -- This is the big daddy. It is broken down into several sections: FORK() How do we handle fork()? Do we use the cygwin method that copies the whole data segment, or put the global data in shared memory and copy that small part manually after we create a new process? THREADING Related to fork(), do we implement an optionally threaded postmaster, which eliminates CreateProcess() entirely? I don't think we will have superior performance on Win32 without it. (This would greatly help Solaris as well.) IPC We can use Cygwin, MinGW, Apache, or our own code for this. Are there other options? ENVIRONMENT Lots of our code requires a unix shell and utilities. Will we continue using cygwin for this? -- - As a roadmap, it would be good to get consensus on as many of these items as possible so people can start working in these areas. We can keep a web page of decisions we have made to help rally developers to the project. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] Roadmap for a Win32 port
I think SGI gets amazing performance because they have very good (efficient) synchronisation primitives on SGI. Some proprietary light-weight mutexes. Using threaded or mixed model just by itself is not going to do a miracle. Threads will save you some context switch time, but that will probably translate into lower CPU usage rather than performance boost. And if your mutexes are not fast or awkwardly implemented (say Linux), it might be even worse. Apache is not all that fast on Linux as on SGI, whatever model you chose. I also doubt that purely threaded model would be slower than mixed one. Now about the AIO model. It is useful when you need to do something else while I/O requests are being processed as long as platform does it in some useful way. If all you can do is to submit requests and keep sitting in select/poll then AIO does not buy you anything you can't get by just using threaded model. However, if you can tag the requests and set up notifications, then few I/O threads could handle relatively large number of requests from different clients. Note, this means you don't have any association between clients and servers at all, there is pool of generic I/O threads which serve requests from whoever they come. It saves system resources and scales very well. It also provides interesting possibilities for fault recovery - since handlers are generic all the state information would have to be kept in some kind of global context area. That area can be saved into persistent memory or dumped onto disk and *recovered* after a forced restart. Server and library could be designed in such a way that clients may continue where they left with a recoverable error. In POSIX AIO model you can tag requests and set up notifications via synchronous signals. You wait for them *synchronously* in 'waiter' thread via sigwaitinfo() and avoid the headache of asynchronous signals hitting you any time... Unfortunately on some platforms (Solaris) the depth of synchronous signal queue is fixed at magic value 32 (and not adjustable). This may not be a problem if you're sure that waiting thread will be able to drain the queue faster than it gets filled with notifications... but I'm not sure there is a portable way to guarantee that, so you need to check for overloads and handle them... that complicates things. On Solaris you also need a mile of compiler/linker switches to even get this scheme to work and I am afraid other platforms may not support it at all (but then again, they may not support AIO to begin with). And speaking about getting best of all worlds. Note how Apache spent nearly 3 years developing their portable Multi-Processing Modules scheme. What they got for that is handful of models neither of which perform noticeably better than original pre-fork() model. Trying to swallow all possible ways to handle things on all possible platforms usually does not produce very fast code. It tends to produce very complex code with mediocre performance and introduces extra complexity into configuration process. If you consider all that was done mostly to support Win32, one might doubt if it was worth the while. What I am trying to say is, extra complexity in model to squeeze few percent of performance is not a wise investment of time and efforts. On Win32 you don't really compete in terms of performance. You compete in terms of easyness and features. Spend 3 years trying to support Windows and Unix in most optimal way including all subvariants of Unix ... meanwhile MSFT will come up with some bundled SQL server. It probably will have more features since they will spend time doing features rather than inventing a model to support gazillion of platforms. Chances are, it will be faster too - due to better integration with OS and better compiler. I am not in position to tell you what to do guys. But if I was asked, I'd say supporting Win32 is only worth it if it comes as a natural result of a simple, coherent and uniform model applied to Unix. Threaded model may not have as much inherent stability as forked/mixed, but it has inherent simplicity and better Unix/Windows/BeOS portability. It can be done faster and simpler code will make work on features easier. Regards, - Igor There are 2 ways to design an efficient system - first is to design it so complex that there are no obvious deficiencies, second is to design it so simple that there are obviously no deficiencies. Second way is much harder (author unknown to me) - Original Message - From: Neil Conway [EMAIL PROTECTED] To: Jon Franz [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 7:05 PM Subject: Re: [HACKERS] Roadmap for a Win32 port On Wed, 5 Jun 2002 18:50:46 -0400 Jon Franz [EMAIL PROTECTED] wrote: One note: SGI developers discovered they could get amazing performance using as hybrid threaded and forked-process model with apache - we might want to look into this. They even have a library for network-communication utilizing
Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports
That's what Apache does. Note, on most platforms MAP_ANON is equivalent to mmmap-ing /dev/zero. Solaris for example does not provide MAP_ANON but using fd=open(/dev/zero) mmap(fd, ...) close(fd) works just fine. - Original Message - From: Bruce Momjian [EMAIL PROTECTED] To: Igor Kovalenko [EMAIL PROTECTED] Cc: Tom Lane [EMAIL PROTECTED]; mlw [EMAIL PROTECTED]; Marc G. Fournier [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, June 02, 2002 7:47 PM Subject: Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports Igor Kovalenko wrote: It does not have to be anonymous. POSIX also defines shm_open(same arguments as open) API which will create named object in whatever location corresponds to shared memory storage on that platform (object is then grown to needed size by ftruncate() and the fd is then passed to mmap). The object will exist in name space and can be detected by subsequent calls to shm_open() with same name. It is not really different from doing open(), but more portable (mmap() on regular files may not be supported). Actually, I think the best shared memory implemention would be MAP_ANON | MAP_SHARED mmap(), which could be called from the postmaster and passed to child processes. While all our platforms have mmap(), many don't have MAP_ANON, but those that do could use it. You need MAP_ANON to prevent the shared memory from being written to a disk file. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [HACKERS] HEADS UP: Win32/OS2/BeOS native ports
Marc G. Fournier [EMAIL PROTECTED] writes: Since our default behavior (at startup) is to have TCP sockets disabled, how many OSs are there that don't support UD sockets? A quick look in the sources shows that we #undef HAVE_UNIX_SOCKETS for QNX, BeOS, and old cygwin versions ... which are exactly the platforms that don't have SysV shmem support, so those are exactly the guys who we're trying to fix the problem for. Next release of QNX (6.2) will add support for UDS, but they are still not quite portable. I do like the idea of using a Unix socket this way where available, though. It'd let us switch over the shmem code to using IPC_PRIVATE shmem key, which'd simplify that code tremendously; and we could make some progress against the dead-PID-in-lockfile problem. Could we get away with saying that the Unix-socket-less platforms have weaker protection against mistakenly restarting the postmaster? We could have a plain-vanilla lockfile instead of a socket lockfile on those platforms, which would not catch the dead-postmaster-live-backends case, but it'd be better than nothing. And I am not convinced that the shmem-connection-count check should be trusted on QNX or BeOS, anyway, so I'm not sure that they actually have a functioning check now. Why can't we use named pipe (aka FIFO file) instead of UDS? I think that is more portable... The socketpair() function also tends to be more portable than whole UDS in general... It works on QNX4 even, but not sure about BeOS. Another thought is, why can't we use bind() to the postmaster port to detect other postmasters? I might be missing something, so pardon by ignorance. But should not bind() to same port fail with EADDRINUSE unless SO_REUSEADDR is set? I don't really know if it is set in postgres or not ... -- igor ---(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: [HACKERS] make report
It depends. QNX4 may be used with GCC, in which case it does have long long. I am not sure if that combination will play along with Postgres, but it should not be assumed impossible. - Original Message - From: Peter Eisentraut [EMAIL PROTECTED] To: Thomas Lockhart [EMAIL PROTECTED] Cc: PostgreSQL Hackers [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 1:14 PM Subject: Re: [HACKERS] make report Thomas Lockhart writes: Right. The two areas which come to mind are integer availability and the timezone support (as you might know we support *three* different time zone models). At the moment, none of the developers know the features supported on the platforms we claim to support. Which platforms do not have int8 support still? Still is the wrong word. There used to be platforms with certain areas of trouble, and those platforms don't go away. But since you asked: QNX 4 and SCO OpenServer are known to lack 8 byte integers. Which do not have time zone interfaces fitting into the two zonefull styles? I'd like to know, but istm that the people *with* the platforms could do this much more easily than those without. What am I missing here?? I don't think polling users this way will yield reliable results. If you really want to find out, break something and see if someone complains. -- Peter Eisentraut [EMAIL PROTECTED] ---(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 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: Fw: Fw: [HACKERS] bad performance on irix
Does that mean I should redo patch for 7.3 as is, or you guys want it to go farther this time? The last version had compromises intended to make changes minimal... Also, does anyone from Darwin or BeOS camp care? You guys should not be working through emulation of SysV ugliness. If someone is listening, we could come up with a version suitable for you too... -- igor Christopher Kings-Lynne wrote: Just remember that patches for 7.3 are being accepted at this very moment... Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Igor Kovalenko Sent: Friday, 22 March 2002 1:31 AM To: Luis Alberto Amigo Navarro Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Fw: Fw: [HACKERS] bad performance on irix No, I've been told it is not gonna be considered for 7.2x and I shall wait till 7.3. Luis Alberto Amigo Navarro wrote: Makes me wonder... perhaps now someone will be convinced to take a look at the POSIX IPC patch. On some platforms (not on Linux I am afraid) POSIX mutexes might be quite a bit faster than SYSV semaphores. Is there any current patch? Regards ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: Fw: Fw: [HACKERS] bad performance on irix
No, I've been told it is not gonna be considered for 7.2x and I shall wait till 7.3. Luis Alberto Amigo Navarro wrote: Makes me wonder... perhaps now someone will be convinced to take a look at the POSIX IPC patch. On some platforms (not on Linux I am afraid) POSIX mutexes might be quite a bit faster than SYSV semaphores. Is there any current patch? Regards ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: Fw: Fw: [HACKERS] bad performance on irix
Makes me wonder... perhaps now someone will be convinced to take a look at the POSIX IPC patch. On some platforms (not on Linux I am afraid) POSIX mutexes might be quite a bit faster than SYSV semaphores. Luis Alberto Amigo Navarro wrote: Hi all: again on performance, here is an extract from an 8 read-only queries, notice that total time is 179s and it is expending about 80secs only in semaphores Isn't there any other way to improve ipc-locks? thanks and regards. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: Fw: Fw: [HACKERS] bad performance on irix
I am confused to hell. I always thought MIPS does NOT have TAS instruction ;) Robert E. Bruccoleri wrote: Dear Igor, Igor Kovalenko writes: Makes me wonder... perhaps now someone will be convinced to take a look at the POSIX IPC patch. On some platforms (not on Linux I am afraid) POSIX mutexes might be quite a bit faster than SYSV semaphores. Yes, but on the SGI platform, the MIPS test_and_set instructions are really fast and should be used. +-++ | Robert E. Bruccoleri, Ph.D. | email: [EMAIL PROTECTED]| | P.O. Box 314| URL: http://www.congen.com/~bruc | | Pennington, NJ 08534|| +-++ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: Fw: Fw: [HACKERS] bad performance on irix
Okay. Anyway, the semaphores are apparently used for purposes other than TAS. That can be made faster too, on platforms which support POSIX mutexes (shared between processes). Robert E. Bruccoleri wrote: Dear Igor, I am confused to hell. I always thought MIPS does NOT have TAS instruction ;) On the SGI platform, there are very high speed implementations of test and set which allow large number of processes to safely and quickly access shared memory. SGI has a hardware team that specifies MIPS processor variants that are used in their servers so the machines can scale. I've tried to get SGI interested in putting some internal engineering effort to improve PostgreSQL performance on operations which could benefit from its shared memory parallel architecture (like index creation and sorting), but without success. +-++ | Robert E. Bruccoleri, Ph.D. | email: [EMAIL PROTECTED]| | P.O. Box 314| URL: http://www.congen.com/~bruc | | Pennington, NJ 08534|| +-++ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
One more [HACKERS] 486 Optimizations...
Hi , I would like to increase perfomance of PG 7.02 on i486, where can I read about this ? May be there is any flags for postgres ? Thanks. Igor