Re: [BUGS] Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
On 03.02.2012 02:48, Bruce Momjian wrote: Sorry for the late reply, but Heikki, can you get this Itanium information into s_lock.h as a comment, particularly the information about the +Ovolatile=__unordered flag? Good idea. I came up with the attached, hope that explains it. Looking back at the discussions, we concluded that the current code is safe on gcc, because it implicitly adds the .rel/.acq opcodes to volatile accesses, and HP's compiler does the same as long as you don't explicitly disable it with +Ovolatile=__unordered. But what about Intel's icc compiler? Presumably it's also safe, but looking at Intel's manuals that I found, I'm not completely sure about it. There's an option, -m[no-]serialize-volatile, that controls it, but I couldn't figure out which is the default. Looking at the docs on that from Intel that I found [1], it seems to me that on Linux, the default is *not* safe, but on Windows it is. Sergey, you have dugong in the buildfarm that uses Intel's compiler on Itanium. Could you verify whether the -mno-serialize-volatile is the default? If you could for example extract the assembler code generated by icc for xlog.c, and send it over. Whether it's generating the .rel/.acq opcodes should be easy to see in the generated code of the XLogGetLastRemoved() function, for example, which doesn't do much else than grab a spinlock. On gcc, the -s flag generates the assembly files, I presume it's the same on icc. Perhaps we should set those compiler flags explicitly in configure, regardless of the defaults. [1] http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/compiler_c/copts/ccpp_options/option_qserialize-volatile.htm -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 074838e..d55b662 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -234,7 +234,22 @@ spin_delay(void) #endif /* __x86_64__ */ -#if defined(__ia64__) || defined(__ia64) /* Intel Itanium */ +#if defined(__ia64__) || defined(__ia64) +/* + * Intel Itanium, gcc or Intel's compiler. + * + * Itanium has weak memory ordering, but we rely on the compiler to enforce + * strict ordering of accesses to volatile data. In particular, while the + * xchg instruction implicitly acts as a memory barrier with 'acquire' + * semantics, we do not have an explicit memory fence instruction in the + * S_UNLOCK macro. We use a regular assignment to clear the spinlock, and + * trust that the compiler marks the generated store instruction with the + * ".rel" opcode. + * + * Testing shows that assumption holds on gcc, although I could not find any + * official statement on that in the gcc manual. In Intel's compiler, the + * -m[no-]serialize-volatile option controls that. Keep it enabled! + */ #define HAS_TEST_AND_SET typedef unsigned int slock_t; @@ -785,7 +800,19 @@ tas(volatile slock_t *lock) #if defined(__hpux) && defined(__ia64) && !defined(__GNUC__) - +/* + * HP-UX on Itanium, non-gcc compiler + * + * We assume that the compiler enforces strict ordering of loads/stores on + * volatile data (see comments on the gcc-version earlier in this file). + * Note that this assumption does *not* hold if you use the + * +Ovolatile=__unordered option on the HP-UX compiler, so don't do that. + * + * See also Implementing Spinlocks on the Intel Itanium Architecture and + * PA-RISC, by Tor Ekqvist and David Graves, for more information. As of + * this writing, version 1.0 of the manual is available at: + * http://h21007.www2.hp.com/portal/download/files/unprot/itanium/spinlocks.pdf + */ #define HAS_TEST_AND_SET typedef unsigned int slock_t; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6435: Problemas con la instalacion
The following bug has been logged on the website: Bug reference: 6435 Logged by: wilson camargo Email address: desarroll...@desysteconline.com PostgreSQL version: 9.1.2 Operating system: win 7, win xp 32bit Description: Estoy tratando de instalar la version de postgres 9.1.2, todo el proceso inicial se hace correctamente pero al final muestra un erro de incializacion del motor de base de datos, finalmente muestra que ocurrio un error miestras trataba de cargar el archivo de configuracion postgres.conf, ahora si veo el directorio de instalacion la carpeta data no tiene informacion, creo que apartir de los nuevos instaladores disponibles desde hace unos dias, puesto que tengo un instalador de la version 9.1.1 que descargue hace unos meses y funciona correctamente, pero hice la prueba con la misma version y con el nuevo intalador y se presenta en mismo error que en la version 9.1.2. trate de darle todos los privilegios al usuario postgres pero el error persiste. agradeceria por favor me puedan ayudar sobre el incidente registrado. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6434: Wishlist: SHA-512 ("$6$" salt) for crypt()
The following bug has been logged on the website: Bug reference: 6434 Logged by: Christian Hammers Email address: c...@lathspell.de PostgreSQL version: 9.1.2 Operating system: Debian GNU/Linux Description: The crypt() function from the pgcrypto extension is great to store and check passwords in a format that can also be used by Linux PAM and all programming languages that support the libc crypt() function. Recent Linux versions started to use a crypt algorithm that is based on SHA-512 and stores hashes in the form "$6$xxsaltxx$." but Postgres can only hash/verify password hashes in the old DES or the "$1$xxsaltxx$..." MD5 based format. It would be nice if the pgcrypt extension would be extendet to support the new SHA-256 and SHA-512 algorithms. Further documentation on the libc implementation can be found on http://www.akkadia.org/drepper/SHA-crypt.txt but you can probably copy it from the OpenBSD source like you did with crypt-md5.c. Testcase in SQL: SELECT crypt('geheim', '$6$$'); Does give "$6C0C9PsKORBQ" but should lead to "$6$$wuSdyeOvQXjj/nNoWnjjo.6OxUWrQFRIj019kh1cDpun6l6cpr3ywSrBprYRYZXcm4Kv9lboCEFI3GzBkdNAz/" -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6432: does not begin the installer
The following bug has been logged on the website: Bug reference: 6432 Logged by: J Camphor Email address: jt_com...@yahoo.co.jp PostgreSQL version: 9.1.2 Operating system: Windows 7 Ultimate sp1 64bit jp=Japanese Description: I get the postgresql-9.1.2-1-windows-x64.exe from http://www.enterprisedb.com/products-services-training/pgdownload#windows. I locate it on my desktop and double click it. [Issue] But there is no splash image nor installer gui. After moment, I check the Task manager of windows and cannot find out postgres(installer) process. So I cannot install PostgreSQL 9.1.2. [My solution] I have installed, off course, microsoft office 2007(japanese edition) on my windows machine. I change IME from "Office IME" to default one. Installer display a splash image and works fine completely. After install, I re-change/rollback IME setting and postgres works running. [My expectation] I want to install without changing IME setting. 9.1.1 installer does not have this problem. regards -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6433: Pg Admin Cant open
The following bug has been logged on the website: Bug reference: 6433 Logged by: ajit Email address: ajit.pradnyav...@gmail.com PostgreSQL version: 8.3.0 Operating system: windows Xp SP 3 Description: Sir, i have installed postgreSQL 8.2 on my computer. After installation i m opening Pg Admin but it gives me error.(it shows there is problem in the pg configuration ). but other menus like postgre command prompt works properly. how can i resolve this problem. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #6425: Bus error in slot_deform_tuple
[ in re bugs 6200 and 6425 ] I've committed patches for all the issues I could find pursuant to these bug reports. Please see if you can break REL9_0_STABLE branch tip (or 9.1 if that's what you're working with). regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6436: ecpg processed wrong variable name for host value of struct at EXEC SQL INSERT
The following bug has been logged on the website: Bug reference: 6436 Logged by: Atsushi Tanaka Email address: a.tanak...@gmail.com PostgreSQL version: 9.1.2 Operating system: CentOS 6.2 Description: I tried preprocess my program source by ecpg. Then, ecpg processed wrong variable name for host value of struct. variable definition: -- EXEC SQL BEGIN DECLARE SECTION; struct _save_data { varchar vstring[256]; int idx; } save_data; EXEC SQL END DECLARE SECTION; -- call EXEC SQL: -- EXEC SQL INSERT INTO test_tbl ( title ) VALUES ( :save_data.vstring ); -- wrong preprocessed line: -- ECPGt_varchar,&(save_data.vstring),(long)256,(long)1,sizeof(struct varchar_save_data.vstring_1), -- correct: -- ECPGt_varchar,&(save_data.vstring),(long)256,(long)1,sizeof(struct varchar_vstring_1), -- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs