[PATCHES] zope connection string
In order to my mail bug #2801 I've solved this one modify the zope-psycopgda connection string: postgresql7.4.7:dbname=... user=... while postgresql7.2.1:dbname=... user=... host=... I don't know why but it works. Cordial regards Carmelo -- Mutuo da 200.000? Tassi ridotti:euribor +0.69%. Solo per richieste online. www.mutuionline.it http://click.libero.it/mutuionline04dic0 ---(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
Re: [PATCHES] Updatable views
- Original Message - From: [EMAIL PROTECTED] Alvaro Herrera To: [EMAIL PROTECTED] Date: 25.08.2006 00:50:59 Subject: Re: [PATCHES] Updatable views Minor suggestion: change get_view_qualification_function to look the function by Oid rather than name. I wasn't sure it was actually a good idea to use a function that way, but if it's going to stay ... Another: remove create_nothing_rule, replace with call to create_rule_stmt. Another: change hasRule to return a bool instead of an Oid. Another: instead of a comment like this: /* * XXX It seems to me that these checks are not necessary; and further, * they are useless. This is because the view is just being created, * thus it cannot have any rules before the ones we are going to * create. * * XXX What about CREATE OR REPLACE VIEW ??? */ have a single paragraph explaining why the replace flag is needed. Okay, i'll sent a reworked version asap, but can't get to it before monday. I'm away from my machine this weekend and have only sporadic access to my email. Bernd ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[PATCHES] PL instrumentation plugin and Rendezvous variable support - version 2
This is an updated version of the PL instrumentation plugin patch that I submitted on July-28. The new version re-implements the plugin loader code to use rendezvous variables as suggested by Tom Lane (thanks Tom, very elegant design). I have not implemented any support for unloading shared libraries. Once we've finalized the design for rendezvous variables, I'll submit a separate documentation patch. -- Korry -- Korry Douglas [EMAIL PROTECTED] EnterpriseDB http://www.enterprisedb.com Index: src/backend/tcop/postgres.c === RCS file: /projects/cvsroot/pgsql/src/backend/tcop/postgres.c,v retrieving revision 1.497 diff -w -c -r1.497 postgres.c *** src/backend/tcop/postgres.c 10 Aug 2006 00:44:01 - 1.497 --- src/backend/tcop/postgres.c 11 Aug 2006 15:53:24 - *** *** 2976,2981 --- 2976,2987 BeginReportingGUCOptions(); /* + * Load any shared-libraries indicated by the backend_load_libraries + * GUC variable. + */ + process_backend_libraries(); + + /* * Also set up handler to log session end; we have to wait till now to be * sure Log_disconnections has its final value. */ Index: src/backend/utils/fmgr/dfmgr.c === RCS file: /projects/cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v retrieving revision 1.87 diff -w -c -r1.87 dfmgr.c *** src/backend/utils/fmgr/dfmgr.c 8 Aug 2006 19:15:08 - 1.87 --- src/backend/utils/fmgr/dfmgr.c 11 Aug 2006 15:53:26 - *** *** 23,34 #endif #include miscadmin.h #include utils/dynamic_loader.h ! /* signatures for PostgreSQL-specific library init/fini functions */ typedef void (*PG_init_t)(void); typedef void (*PG_fini_t)(void); /* * List of dynamically loaded files (kept in malloc'd memory). */ --- 23,40 #endif #include miscadmin.h #include utils/dynamic_loader.h ! #include utils/hsearch.h /* signatures for PostgreSQL-specific library init/fini functions */ typedef void (*PG_init_t)(void); typedef void (*PG_fini_t)(void); + typedef struct + { + char varName[NAMEDATALEN]; + void *varValue; + } rendezvousHashEntry; + /* * List of dynamically loaded files (kept in malloc'd memory). */ *** *** 324,329 --- 330,380 return pg_dlsym(filehandle, funcname); } + /* + * Find (or create) a rendezvous variable that one dynamically + * loaded library can use to meet up with another. + * + * When you first call this function, a simple variable is + * created with the given name. The value of the variable is + * void pointer (initially set to NULL). The next time you + * call find_rendezvous_variable() with the same name, you + * get the address of the void pointer created by the first + * call. + * + * Dynamically loaded libraries can use rendezvous variables + * to find each other and share information (through the + * void pointer). + */ + void ** + find_rendezvous_variable(const char *varName) + { + static HTAB *rendezvousHash = NULL; + char key[NAMEDATALEN] = {0}; + rendezvousHashEntry *hentry; + bool found; + + /* Create a variable hash if we haven't already done so */ + if (rendezvousHash == NULL) + { + HASHCTL ctl; + + ctl.keysize= NAMEDATALEN; + ctl.entrysize = sizeof(rendezvousHashEntry); + rendezvousHash = hash_create(Rendezvous variable hash, 5, ctl, HASH_ELEM); + + Assert(rendezvousHash != NULL); + } + + /* Turn the varName into a fixed-size string */ + snprintf(key, NAMEDATALEN, %s, varName); + + hentry = (rendezvousHashEntry *) hash_search(rendezvousHash, key, HASH_ENTER, found); + + if (!found) + hentry-varValue = NULL; + + return hentry-varValue; + } static bool file_exists(const char *name) Index: src/backend/utils/init/miscinit.c === RCS file: /projects/cvsroot/pgsql/src/backend/utils/init/miscinit.c,v retrieving revision 1.156 diff -w -c -r1.156 miscinit.c *** src/backend/utils/init/miscinit.c 8 Aug 2006 19:15:08 - 1.156 --- src/backend/utils/init/miscinit.c 11 Aug 2006 15:53:30 - *** *** 1097,1120 *- */ ! /* GUC variable: list of library names to be preloaded */ char *preload_libraries_string = NULL; /* ! * process any libraries that should be preloaded at postmaster start */ ! void ! process_preload_libraries(void) { char *rawstring; List *elemlist; ListCell *l; ! if (preload_libraries_string == NULL) return; /* Need a modifiable copy of string */ ! rawstring = pstrdup(preload_libraries_string); /* Parse string into list of identifiers */ if (!SplitIdentifierString(rawstring, ',', elemlist)) --- 1097,1126
Re: [PATCHES] PL instrumentation plugin support (i.e. PL/pgSQL
In view of the other patch submitted to support init/fini functions for shared libraries, I'm inclined to change this one to depend on that; in particular it seems like we could eliminate the necessity for users to specify the correct setup-function names. Thoughts? I think that would be great. Can you point me to the patch you're referring to? I can convert my patch if you prefer. -- Korry -- Korry Douglas [EMAIL PROTECTED] EnterpriseDB http://www.enterprisedb.com
Re: [PATCHES] Replication Documentation
s/sequnce/sequence/ Nice work! -- Korry Douglas [EMAIL PROTECTED] EnterpriseDB http://www.enterprisedb.com
Re: [PATCHES] [HACKERS] Possible explanation for Win32 stats regression test
Is anyone working on this? Tom Lane wrote: korry [EMAIL PROTECTED] writes: The problem is that, each time you go through pgwin32_waitforsinglesocket(), you tie the *same* kernel object (waitevent is static) to each socket. The fix is pretty simple - just call WSAEventSelect( s, waitevent, 0 ) after WaitForMultipleObjectsEx() returns. That disassociates the socket from the Event (it will get re-associated the next time pgwin32_waitforsingleselect() is called. Hmm. Presumably we don't do this a whole lot (use multiple sockets) or we'd have noticed before. Perhaps better would be to keep an additional static variable saying which socket the event is currently associated to, and only issue the extra WSAEventSelect calls if we need to change it. Or is WSAEventSelect fast enough that it doesn't matter? Here's a simple patch that fixes the problem (I haven't explored the performance of this patch compared to Tom's suggestion). -- Korry Index: src/backend/port/win32/socket.c === RCS file: /projects/cvsroot/pgsql/src/backend/port/win32/socket.c,v retrieving revision 1.11 diff -w -c -r1.11 socket.c *** src/backend/port/win32/socket.c 5 Mar 2006 15:58:35 - 1.11 --- src/backend/port/win32/socket.c 29 Jul 2006 12:13:19 - *** *** 132,137 --- 132,154 events[1] = waitevent; r = WaitForMultipleObjectsEx(2, events, FALSE, INFINITE, TRUE); + + /* + * NOTE: we must disassociate this socket from waitevent - if we don't, then + * we may accidentally fire waitevent at some point in the future if, + * for example, the socket is closed. That normally would not be a + * problem, but if you ever have two (or more) sockets in a single + * backend, they *ALL* share the same waitevent. So, if you pass through + * this function for socket1 and socket2, a close on EITHER socket will + * trigger an FD_CLOSE event, regardless of whether you're waiting for + * socket1 or socket2. That means that if you are waiting for socket1 + * and socket2 gets some interesting traffic (an FD_CLOSE or FD_READ + * event for example), the above call to WaitForMultipleObjectsEx() + * will return even though nothing actually happened to socket1. Nasty... + */ + + WSAEventSelect(s, waitevent, 0 ); + if (r == WAIT_OBJECT_0 || r == WAIT_IO_COMPLETION) { pgwin32_dispatch_queued_signals(); ---(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: [PATCHES] [HACKERS] Possible explanation for Win32 stats
heh. I was just doing it the way Tom suggested - see attached. With a little more trouble we could also keep track if the listened for events and sometimes save ourselves a second call to WSAEventSelect, but I'm not sure it's worth it. It all depends on the overhead of WSAEventSelect(). I'm sure your version would run faster, but I just don't know if slower would be measurable. BTW: I would suggest changing your comment to: /* * make sure we don't multiplex this kernel event object with a different socket * from a previous call */ Thanks for tackling this problem too. -- Korry Korry Douglas [EMAIL PROTECTED] EnterpriseDB http://www.enterprisedb.com
Re: [PATCHES] [INTERFACES] bcc32 libpq compile problem
thanks a lot ... now i go to try ... fabio Fabio Guidi wrote: the compiler build correctly the package without error message ? Bruce Momjian ha scritto: I downloaded the Borland compiler and am running build tests now. I finally got it working. I had to make major changes to the build file. The new attached bcc32.mak should build on your 8.0.X system, and this file will be in 8.0.3. -- 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 Navighi a 4 MEGA e i primi 3 mesi sono GRATIS. Scegli Libero Adsl Flat senza limiti su http://www.libero.it ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [PATCHES] [INTERFACES] bcc32 libpq compile problem
I try to use your make file, but i obtain an error at the end of build ... this time the directory has created and several objs are present in it... i attach the screenshot that appear... thanks a lot again fabio Fabio Guidi wrote: the compiler build correctly the package without error message ? Bruce Momjian ha scritto: I downloaded the Borland compiler and am running build tests now. I finally got it working. I had to make major changes to the build file. The new attached bcc32.mak should build on your 8.0.X system, and this file will be in 8.0.3. -- 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 Navighi a 4 MEGA e i primi 3 mesi sono GRATIS. Scegli Libero Adsl Flat senza limiti su http://www.libero.it C:\postgresql_src\postgresql-8.0.2\src\interfaces\libpqmake -N -DCFG=Release /f bcc32.mak MAKE Version 5.2 Copyright (c) 1987, 2000 Borland Building the Win32 DLL and Static Library... Configuration Release copy pthread.h.win32 pthread.h 1 file(s) copied. echo #define SYSCONFDIR pg_config_paths.h bcc32.exe -Ic:\Borland\Bcc55\include;..\..\include -n.\Release -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-us e -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG win32.c Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland win32.c: bcc32.exe @MAKE0002.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\port\getaddrinfo.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe @MAKE0003.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\port\pgstrcasecmp.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe @MAKE0004.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\port\thread.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe @MAKE0005.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\port\inet_aton.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe @MAKE0006.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\port\crypt.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe @MAKE0007.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\port\noblock.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical Warning W8075 ..\..\port\noblock.c 30: Suspicious pointer conversion in function pg_set_noblock Warning W8075 ..\..\port\noblock.c 53: Suspicious pointer conversion in function pg_set_block bcc32.exe @MAKE0008.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\backend\libpq\md5.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe @MAKE0009.@@@ Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland ..\..\backend\libpq\ip.c: Warning W8017 ..\..\include\port/win32.h 41: Redefinition of 'DLLIMPORT' is not identical Warning W8017 ..\..\include\port/win32.h 144: Redefinition of 'SIGUSR1' is not i dentical Warning W8017 ..\..\include\port/win32.h 145: Redefinition of 'SIGUSR2' is not i dentical bcc32.exe -Ic:\Borland\Bcc55\include;..\..\include
Re: [PATCHES] [INTERFACES] bcc32 libpq compile problem
There where an extra character in the .mak file, and then i try to rebuild and now i obtain these errors ... at the and a file called blibpq.lib was built but it don't seem valid. Fabio Guidi wrote: the compiler build correctly the package without error message ? Bruce Momjian ha scritto: I downloaded the Borland compiler and am running build tests now. I finally got it working. I had to make major changes to the build file. The new attached bcc32.mak should build on your 8.0.X system, and this file will be in 8.0.3. -- 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 Navighi a 4 MEGA e i primi 3 mesi sono GRATIS. Scegli Libero Adsl Flat senza limiti su http://www.libero.it bcc32.exe -Ic:\Borland\Bcc55\include;..\..\include -n.\Release -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-us e -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG pthread-win32.c Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland pthread-win32.c: tlib.exe .\Release\blibpq.lib @MAKE0001.@@@ TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation +-.\Release\win32.obj +-.\Release\getaddrinfo.obj +-.\Release\pgstrcasecmp.obj +-.\Release\thread.obj +-.\Release\inet_aton.obj +-.\Release\crypt.obj +-.\Release\noblock.obj +-.\Release\md5.obj +-.\Release\ip.obj +-.\Release\fe-auth.obj +-.\Release\fe-protocol2.obj +-.\Release\fe-protocol3.obj +-.\Release\fe-connect.obj +-.\Release\fe-exec.obj +-.\Release\fe-lobj.obj +-.\Release\fe-misc.obj +-.\Release\fe-print.obj +-.\Release\fe-secure.obj +-.\Release\pqexpbuffer.obj +-.\Release\pqsignal.obj +-.\Release\wchar.obj +-.\Release\encnames.obj +-.\Release\pthread-win32.obj +- Warning: 'win32' not found in library Warning: 'getaddrinfo' not found in library Warning: 'pgstrcasecmp' not found in library Warning: 'thread' not found in library Warning: 'inet_aton' not found in library Warning: 'crypt' not found in library Warning: 'noblock' not found in library Warning: 'md5' not found in library Warning: 'ip' not found in library Warning: 'fe-auth' not found in library Warning: 'fe-protocol2' not found in library Warning: 'fe-protocol3' not found in library Warning: 'fe-connect' not found in library Warning: 'fe-exec' not found in library Warning: 'fe-lobj' not found in library Warning: 'fe-misc' not found in library Warning: public '_pqFlush' in module 'fe-misc' clashes with prior module 'fe-exec' Warning: 'fe-print' not found in library Warning: 'fe-secure' not found in library Warning: 'pqexpbuffer' not found in library Warning: 'pqsignal' not found in library Warning: 'wchar' not found in library Warning: 'encnames' not found in library Warning: 'pthread-win32' not found in library Warning: '' not found in library Warning: '.OBJ' file not found bcc32.exe -Ic:\Borland\Bcc55\include;..\..\include -n.\Release -WD -c -DFRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP; -tWM -a8 -X -w-us e -w-par -w-pia -w-csu -w-aus -w-ccc -O -Oi -OS -DNDEBUG libpqdll.c Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland libpqdll.c: brcc32.exe -l 0x409 -ic:\Borland\Bcc55\include -fo.\Release\libpq.res libpq.rc Borland Resource Compiler Version 5.40 Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. ilink32.exe @MAKE.@@@ Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland implib -w .\Release\blibpqdll.lib blibpqdll.def .\Release\blibpq.dll Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporation Name: 'blibpqdll' Ext: '.dll' Base: 0x Name: 'BLIBPQ' Ext: '.dll' Base: 0x ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [PATCHES] [INTERFACES] bcc32 libpq compile problem
All OK with libpq, what can i do to work under windows with ecpg ? Thanks a lot Fabio Fabio Guidi wrote: the compiler build correctly the package without error message ? Bruce Momjian ha scritto: I downloaded the Borland compiler and am running build tests now. I finally got it working. I had to make major changes to the build file. The new attached bcc32.mak should build on your 8.0.X system, and this file will be in 8.0.3. -- 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 Navighi a 4 MEGA e i primi 3 mesi sono GRATIS. Scegli Libero Adsl Flat senza limiti su http://www.libero.it ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[PATCHES] Missing Manuals
Here's the manual pages that went missing a few weeks backI asked my secretary to post them through, and she had some success, though that looks like they were weeded out as spam/viruses. My continued absence is the result of a truck's surprise attempt to test my personal capability for crash recovery, which is luckily higher than expected - though my car was less lucky. :) I will write this up as SGML soon, though comments are welcome now. Best Regards, Simon Riggs pitr75_sect1 Description: Binary data ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] [HACKERS] Point in Time Recovery
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Now, if you say people will rarely turn archiving on/off, then one parameter seems to make more sense. I really can't envision a situation where people would do that. If you need PITR at all then you need it 24x7. I agree. The second parameter is only there to clarify the intent. 8.0 does introduce two good reasons to turn it on/off, however: - index build speedups - COPY speedups I would opt to make enabling/disabling archive_command require a postmaster restart. That way there would be no capability to take advantage of the incentive to turn it on/off. For TODO: It would be my intention (in 8.1) to make those available via switches e.g. NOT LOGGED options on CREATE INDEX and COPY, to allow users to take advantage of the no logging optimization without turning off PITR system wide. (Just as this is possible in Oracle and Teradata). I would also aim to make the first Insert Select into an empty table not logged (optionally). This is an important optimization for Oracle, teradata and DB2 (which uses NOT LOGGED INITIALLY). Best Regards, Simon Riggs ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[PATCHES] Italian NLS, libpq-it.po updates
Please commit the changes, file reviewed by Gaetano Mendola. Corrected a couple of messages. Regards, Fabrizio Mazzoni libpq-it.po Description: Binary data ---(end of broadcast)--- TIP 8: explain analyze is your friend
[PATCHES] libpq Italian Version first translation
This is a first translation of the libpq.pot file .. Regards, Fabrizio Mazzoni libpq-it.po Description: Binary data ---(end of broadcast)--- TIP 8: explain analyze is your friend