Skip site navigation (1) Skip section navigation (2)

OpenMP in PostgreSQL-8.4.0

From: Reydan Cankur <reydan(dot)cankur(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: OpenMP in PostgreSQL-8.4.0
Date: 2009-11-28 12:10:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

I am trying to run postgresql functions with threads by using OpenMP.  
I tried to parallelize slot_deform_tuple function(src/backend/access/ 
common/heaptuple.c) and added below lines to the code.

#pragma omp parallel
	#pragma omp sections
		#pragma omp section
		values[attnum] = fetchatt(thisatt, tp + off);

		#pragma omp section
		off = att_addlength_pointer(off, thisatt->attlen, tp + off);

During ./configure I saw the information message for  heaptuple.c as  
"OpenMP defined section was parallelized."

Below is the configure that I have run:
./configure CC="/path/to/icc -openmp" CFLAGS="-O2" --prefix=/path/to/ 
pgsql --bindir=/path/to/pgsql/bin --datadir=/path/to/pgsql/share -- 
sysconfdir=/path/to/pgsql/etc --libdir=/path/to/pgsql/lib -- 
includedir=/path/to/pgsql/include --mandir=/path/to/pgsql/man --with- 
pgport=65432 --with-readline --without-zlib

After configure I ran gmake and gmake install and I saw "PostgreSQL  
installation complete."

When I begin to configure for initdb and run below command:
  /path/to/pgsql/bin/initdb -D /path/to/pgsql/data

I get following error:

The files belonging to this database system will be owned by user  
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /path/to/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /path/to/pgsql/data/base/1 ... FATAL:   
could not create unique index "pg_type_typname_nsp_index"
DETAIL:  Table contains duplicated values.
child process exited with exit code 1
initdb: removing contents of data directory "/path/to/pgsql/data"

I could not get the point between initdb process and the change that I  
have made.
I need your help on solution of this issue.

Thanks in advance,


pgsql-performance by date

Next:From: Denis LussierDate: 2009-11-28 14:21:02
Subject: Re: OpenMP in PostgreSQL-8.4.0
Previous:From: Faheem MithaDate: 2009-11-27 21:47:37
Subject: Re: query optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group