| contrib/xml make error on Mac OS X 10.3.4 |
|
 |
Index ‹ database
|
- Previous
- 1
- fix minor memory error in initdb
The new C version of initdb presently provokes the following valgrind
warnings:
==15366==
==15366== Conditional jump or move depends on uninitialised value(s)
==15366== at 0x8049713: mkdir_p (initdb.c:556)
==15366== by 0x8049C8E: mkdatadir (initdb.c:812)
==15366== by 0x804C833: main (initdb.c:2370)
==15366== Invalid read of size 1
==15366== at 0x8049710: mkdir_p (initdb.c:556)
==15366== by 0x8049C8E: mkdatadir (initdb.c:812)
==15366== by 0x804C957: main (initdb.c:2418)
==15366== Address 0x4177D8D3 is 0 bytes after a block of size 19 alloc'd
==15366== at 0x4002CBEE: malloc (vg_replace_malloc.c:160)
==15366== by 0x8049084: xmalloc (initdb.c:249)
==15366== by 0x8049C39: mkdatadir (initdb.c:804)
==15366== by 0x804C957: main (initdb.c:2418)
I doubt the mistake that causes these warnings would cause any
problems in practise (mkdir_p() reads one past the end of the string
passed into it, but doesn't actually change any meaningful state based
on what it reads), but being valgrind-clean is a good thing, so I've
applied the attached one-line patch to fix this.
-Neil
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to email***@***.com so that your
message can get through to the mailing list cleanly
- 4
- Casting Point to Text
Hi all,
PG 7.4 beta4 (not had a chance to upgrade yet :-(
how do i cast something of type point to text?
db=# select '(1,2)'::point::text;
ERROR: cannot cast type point to text
db=# select text('(1,2)'::point);
ERROR: function text(point) does not exist
HINT: No function matches the given name and argument types. You may need to
add explicit type casts.
the only way i have been able to achieve it is to write a plpgsql function:
create function to_s(point) returns text as 'begin return $1; end;' language
plpgsql;
while this appears to work fine - I am wondering if I am missing something
fundamental - specifically whether or not there is an inbuilt way to do it
(which I guess there must be for the plpgsql function to work)?
thanks for your help
Martin
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
- 4
- Pop 3 Emails to PostgresqlBen Pettman wrote:
> I am after a script or way of taking an email downloaded from a POP3
> account, converted to html, then put into a Postgresql database and
> finally to a php or perl page.
Not sure if this is what you are looking for but, dbmail is a mail
storage tool that uses postgresql. Supports POP3/IMAP/SMTP/LMTP I use
it and like it alot.
Matthew
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
- 4
- DBAINTRN: SQL22206NHey all,
does anyone know anything about the following message i get in CC
----
SQL22206N An error occurred while accessing a message queue.
Reason code "<reason-code>".
Explanation:
An unexpected error or bad message was received on a message
queue. The following is a list of reason codes:
1. Unable to create a message queue. The number of message
queues allowed may have been exceeded.
2. An error was encountered while reading from a message
queue.
3. An error was encountered while writing to a message queue.
4. An invalid message was received from a message queue.
5. An error was encountered while opening a message queue.
6. An error was encountered while closing a message queue.
7. An error was encountered while querying a message queue.
8. An error was encountered while deleting a message queue.
User Response:
Ensure the number of message queues allowed is not reached.
Reduce the number of message queues in use if necessary and
resubmit the request.
If you continue to receive this error message after attempting
the suggested solutions, please contact IBM Support.
----
The server system is linux-2.6.5 running on an AMD Opteron (64bits) with
2GB ram. kernel parameters:
kernel.sem = 250 32000 32 1024 kernel.msgmnb = 32768
kernel.msgmni = 1024
kernel.msgmax = 65536
kernel.shmmni = 65536
kernel.shmall = 2112270336
kernel.shmmax = 1073741824
It looks like db2 server (db2 8.2.1 x8664) has a problem using the message
queues. I suspect some of my DB2 processes are not running with the proper
privileges.
Maybe someone could tell me which user should run which processes
(root,instance,das).
Thanks for any feedback
-R-
- 4
- 5
- correlation between ipcs -mb and db2mtrkI am running the following commands on an AIX 5.2 server, using db2 udb
v8.2.2.
my ipcs -mb command gives me the following:
IPC status from /dev/mem as of Mon Nov 20 12:47:25 EST 2006
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0xffffffff --rw-rw---- root system 4096
m 1 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792
m 70254596 0x0d00055c --rw-rw---- root system 1440
m 400556038 0x9efe1774 --rw-rw-rw- dbi1327 db2iadm1 140665792
m 211812360 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792
m 573571084 0xffffffff --rw------- dbi1327 db2iadm1 245284864
m 697303053 0x9efe1761 --rw------- dbi1327 db2iadm1 29163520
m 973078544 0xffffffff --rw------- dbi1327 db2iadm1 1342177280
m 75497489 0xffffffff D-rw------- db2fenc1 db2fadm1 245284864
m 704643090 0x39220c68 --rw-rw---- db2inst1 db2iadm1 184549376
m 140509203 0x39220b74 --rw-rw-rw- db2inst1 db2iadm1 140665792
m 402653204 0x39220b61 --rw------- db2inst1 db2iadm1 29163520
m 449839126 0xffffffff --rw------- db2fenc1 db2fadm1 245284864
m 845152279 0xffffffff --rw------- db2inst1 db2iadm1 131072
and my db2mtrk -i -d -v command :
dbi1327@ep2pcdb14 > db2mtrk -i -d -v
Tracking Memory on: 2006/11/20 at 13:00:53
Memory for instance
Database Monitor Heap is of size 212992 bytes
Other Memory is of size 1392640 bytes
Total: 1605632 bytes
Memory for database: DB1327PP
Backup/Restore/Util Heap is of size 131072 bytes
Package Cache is of size 7208960 bytes
Catalog Cache Heap is of size 2555904 bytes
Buffer Pool Heap is of size 42352640 bytes
Buffer Pool Heap is of size 84606976 bytes
Buffer Pool Heap is of size 8552448 bytes
Buffer Pool Heap is of size 69320704 bytes
Buffer Pool Heap is of size 43368448 bytes
Buffer Pool Heap is of size 138608640 bytes
Buffer Pool Heap is of size 136429568 bytes
Buffer Pool Heap is of size 950272 bytes
Buffer Pool Heap is of size 786432 bytes
Buffer Pool Heap is of size 138608640 bytes
Buffer Pool Heap is of size 655360 bytes
Buffer Pool Heap is of size 393216 bytes
Buffer Pool Heap is of size 262144 bytes
Buffer Pool Heap is of size 196608 bytes
Lock Manager Heap is of size 85147648 bytes
Database Heap is of size 7438336 bytes
Other Memory is of size 0 bytes
Total: 767574016 bytes
Is there any correlation between the two?
My general concept is to figure out, on a multi db2 instance box, the
total amount of memory used by db2. I am going through each instance
and running the db2mtrk command. and grabbing the Total bytes line for
the instance and the active databases ultimatedly aggregating for the
entire box.
my two commands are actually:
db2mtrk -i -d -v | egrep '^Memory|Total:' |perl -ane 'BEGIN {$sum=0;}
$sum+=$1 if (/Total: (\d+) /); END {print "Total: ${sum}\n"; };'
and
ipcs -mb |awk '/db2iadm/{sum+=$7}END{print sum/(1024*1024)}'
TIA,
Kermit
kermit dot lowry at s1 dot com
- 7
- Displaying ODBC errors (it's not happening)Hi,
I have an Access97 db linked to Oracle 7.3.
I am inserting a record (or updating) to a linked table through a
recordset append, which which should return the trigger error message
from the server. However it only returns the message: 3155 - insert on
linked table X failed.
If I enter or update the record directly in the linked table the
trigger error message IS returned.
I have a function that loops through the Errors collection to report
all the ODBC errors that occur. In most cases it does report the
errors as it should. In this case it does not.
Any ideas? I really need to display the trigger errors!
here is the code run on the form Save:
Dim rs As Recordset
Dim fld As Field
Dim strsql As String
Dim smsg As String
If checkMandatoryFields(Me) = False Then
SetStatusMessage SMANDATORYFIELDFAIL, Forms.frmMain
Set rs = Nothing
Set fld = Nothing
Exit Sub
End If
With Me
Select Case pgdata.Properties.EditMode
Case EMADDNEW
If (MsgBox("Update all changes?", vbYesNo + vbQuestion) =
vbYes) Then
.UPDATED = Date
.UPDATED_BY = Nz(Left$(CurrentUser(), 12), "UNKNOWN")
Set rs = Me.RecordsetClone
With rs
.AddNew
For Each fld In rs.Fields
fld.Value = Me(fld.Name)
Next fld
.update
End With
smsg = SUPDATEMSG
Else
smsg = SCANCELMSG
End If
Case Else
If (MsgBox("Update all changes?", vbYesNo + vbQuestion) =
vbYes) Then
.UPDATED = Date
.UPDATED_BY = Nz(Left$(CurrentUser(), 12), "UNKNOWN")
.Dirty = False
smsg = SUPDATEMSG
Else
.Undo
smsg = SCANCELMSG
End If
End Select
End With
SetStatusMessage smsg, Forms.frmMain
Forms("frmMainSectMZimp").ResetForm
Set rs = Nothing
Set fld = Nothing
cmdCancel_Click
err_exit:
Exit Sub
err_handler:
Call ErrorHandler(Me.Name & " cmdSave_click:", Err.Number,
Err.DESCRIPTION, True)
Set rs = Nothing
Set fld = Nothing
Resume err_exit
Here is the Error handler:
Public Function ErrorHandler(rstrProc As String, rlngErr As Long,
rstrDesc As String, displaymsg As Boolean) As String
'Purpose: global error handler. manages the entire error collection
and returns the detailed ODBC errors
On Error GoTo err_handler
Dim db As Database
Dim rs As Recordset
Dim errJet As Error
Dim strDAOMsg As String
Dim strMsg As String
Dim gstrAppTitle As String
Notification True
Set db = CurrentDb
On Error Resume Next
gstrAppTitle = db.Properties("AppTitle")
Set db = Nothing
strMsg = "A Problem was Encountered with " & gstrAppTitle & "@@"
strMsg = strMsg & "Routine: " & rstrProc & vbCrLf & vbCrLf
strMsg = strMsg & "Message: " & rstrDesc & " [" & CStr(rlngErr) & "]"
' If Jet errors were found, add them to the message
If DBEngine.Errors.count > 1 Then
If DBEngine.Errors(DBEngine.Errors.count - 1).Number = rlngErr
Then
For Each errJet In DBEngine.Errors
With errJet
strDAOMsg = strDAOMsg & " " & .DESCRIPTION & " [" &
CStr(.Number) & " in " & .SOURCE & "]"
End With
Next
strMsg = strMsg & vbCrLf & vbCrLf & "Details:" & strDAOMsg
End If
Beep
If displaymsg Then MsgBox strMsg, vbOKOnly + vbCritical,
gstrAppTitle
Else
Beep
If displaymsg Then MsgBox strMsg, vbOKOnly + vbCritical,
gstrAppTitle
End If
ErrorHandler = strMsg
Notification False
err_exit:
On Error Resume Next
Exit Function
err_handler:
' In a failure, this routine should not call itself
Set db = Nothing
Beep
strMsg = "Problem@This application has encountered a problem '" &
Err.DESCRIPTION & " [" & CStr(Err.Number) & "]' in the Error Handler."
& "@"
MsgBox strMsg, vbOKOnly + vbCritical, gstrAppTitle
Resume err_exit
End Function
Thanks,
April
- 7
- MI5 Persecution: Stand up for Free Speech 14/8/95 (2629)From: email***@***.com (Richard Ingram)
Newsgroups: uk.misc
Date: Mon Aug 14 10:08:32 1995
Some cencorship loving bore wrote :
> In article <email***@***.com> email***@***.com (Gareth Evans) writes:
>
> His sysadmin is also next to useless, and has not replied to my request or
> even acknowledged it. Maybe this person *is* a sysadmin?
>
> He's not. It seems the public access site he uses has got no proper
> management over its users. Here's a copy of a reply I got from a
> complaint I made. [After returning every one of Corley's postings to
[snip a large pile of winging complaining drivel]
Geez what a bunch of tossers you all are - you don't like someones postings so
you try and get him evicted from the net, why not just use a kill file - you
DONT have to read his posts/threads now do you ?
Why is it the net is getting populated by the biggest bunch of self absorbed
little Hitlers ? You don't like someones posts so you bloody complain or mail
bomb them - grow up you bunch of fucking sad gits !
Richard.
2629
- 12
- Snapshot from DB2Hi
Is that possible to create a snapshot from a DB2 table? Currently we
are running a java program which select from source DB2 (8) table and
insert into destination oracle (8.1.7) table. (one to one).
I am wondering is there any tool/method available to do this through
snapshot or any other similar method.
Thanks for your help
V Prakash
- 12
- Help with syntax for timestamp additionNew to Postgres 7.3 from 7.0.
Am having some trouble with a query that worked in 7.0 but not in
7.3.....can't seem to figure out the syntax or find info about how to do
this anywhere.
Consider for the following query:
- 'number' is an integer
- 'procedures' is the table name
- 'date' is a timestamp
- 'numdays' is an integer
SELECT number
FROM procedures
WHERE date + numdays <= CURRENT_TIMESTAMP;
In 7.0 this works with no problem...finding all rows where the date plus
some number of days is less than the current. But in 7.3 I get:
ERROR: Unable to identify an operator '+' for types 'timestamp without
time zone' and 'integer'
You will have to retype this query using an explicit cast
I've never had to create casts before so I'm not too sure how to work
this casting into the query....keep getting various syntax errors no
matter what I try. If I try to incorporate intervals, I also get errors.
I just can't seem to find good examples in any documentation.
Any help is appreciated.
-Scott
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
- 12
- alter table drop columnWhy doesn't db2 allow dropping of columns?
I know this issue has been raised several times, but I never saw any
clear answer. It doesn't have to be fast, as long as it's possible.
Now I need to export data, drop table, create table, import data, create
relations, recreate views, recreate triggers, re-grant rights, etc.
Oracle has it, even PostgreSQL has it, why doesn't DB2?
(I just encountered a typo made in a alter table add column in a crucial
table with lots and lots and lots of relations. and now I'm sad :'( )
-R-
- 13
- dBKON Europe 2005 - The dBASE Developers and Users ConferenceTo All dBASE Developers and Users
After we had organized 3 successful German Spoken Conferences (dBKON
2002-2004), we have enough experience now to give the dBKON a sibbling.
The dBKON-Team proudly presents
dBKON Europe 2005 - The European dBASE Developers and Users Conference.
The first and only english spoken dBASE and Database Conference in Europe
(and worldwide this Year)
dBKON 2005 will be held on June 03 and 04, 2005 near Frankfurt / Main
(Germany).
Participants of dBKON Europe 2005 will enjoy two days of lectures, sessions,
discussions and workshops on various dBASE and database programming topics.
This conference is the only event worldwide and will offer the opportunity
to see new programming techniques, find solutions to some of those nagging
problems, and share experiences with other dBASE developers.
dBKON Europe speakers will feature many renowned dBASE experts.
Details to the topics and to the speakers will be published when available.
Frankfurt / Main is the best choice to hold a conference, due to its
excellent situated traffic facilities. The Rhein-Main-Airport (airport code
FRA) is one of the biggest in Europe. The railway station of Frankfurt is
the most inportant railway node in Europe and last but not least two
important Highways are crossing at Frankfurter Kreuz. What can we give you
more? Yes, we will give you much more!!
All session will be held in an easy to understand English, so you do not
need to be afraid, that you will not catch the content. As we have seen in
the past, our speakers are very helpful and have a lot of patience in
explaining complicated subjects.
Interested? To obtain more information about dBKON Europe 2005, see the
homepage of teh dBASE Conferences at: http://www.dbkon.org.
Please note that information in English is not available before weekend.
Greetings from Germany
Hans-Peter Neuwirth
- 14
- Tablescan - why?I have a problem with simple query like this (PK - Primary key)
select t1.*, t2.col1, t3.col2
from
T1
inner join T2 on T2.PK = T1.col1
inner join T3 on T3.PK = T2.col1
T1 is very small table ~20-30 rows, T2 and T3 large. In query plan and
monitor output I see table scan on T3. Why?
Index T2_PK has included column col1.
Access Plan:
-----------
Total Cost: 43603.2
Query Degree: 1
Rows
RETURN
( 1)
Cost
I/O
|
3092
HSJOIN
( 2)
43602.9
10783
/------+------\
227641 3092
TBSCAN NLJOIN
( 3) ( 4)
40666.2 2926.35
10361 422.045
| /---+---\
227641 3092 1
TABLE: S TBSCAN IXSCAN
T3 ( 5) ( 8)
406.107 50.016
100 2
| |
3092 64931
SORT INDEX: S
( 6) T2_PK
406.107
100
|
3092
TBSCAN
( 7)
404.727
100
|
3092
TABLE: S
T1
Andy
P.S. UDB 8.2 FP10 win32
- 14
- plpgsql Integer Concat To StringHi,
I want to concatenate a it counter to a string in a
loop in plpgsql.
DECLARE
counter integer := 1;
IdSet char : = 'UniqueId'
IdForEachRun varchar;
BEGIN
IdForEachRun := IdSet || counter;(PROBLEM HERE)
--Or IdForEachRun := IdSet + counter;(PROBLEM HERE)
While condition LOOP
Insert into Table values(IdForEachRun, ......)
counter := counter + 1;
IdForEachRun := IdSet || counter;(PROBLEM HERE)
--Or IdForEachRun := IdSet + counter;(PROBLEM HERE)
END LOOP
END
Language 'plpgsql'
Thanks in advance.
Paul
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
- 14
- Data modelling contract position
Hello List,
We're looking for a DB modeler who is also a Pg guru. Our principal need is
someone to model a global product database so that it can handle quite
massive i18n (up to 12 languages and lots of country/region relations)
Anyone with experience in this area is welcome to contact us. A more generic
description of the position requirements including rate is listed below.
Please reply to email***@***.com or to me directly.
Sincerely,
Eric Dahnke / Yamaha Music Interactive, Inc. / New York
t : 212 223 6272 / c : 347 524 1992 / f : 212 223 6261
The Database Analyst will model and maintain databases for international
multilingual, portal site.
Responsibilities:
. RDBMs: intimate knowledge of Postgresql (including administration and
maintenance) Guru level.
. Data Modeling: ability to data model at a high level and experience with
building product schemas.
. Experience with modeling / schema design to accommodate several languages.
. Experience with character encoding and handling the storage of non-western
character data within a database
. Ability to enabling referential integrity and ability to setup foreign key
restraints throughout database
. Knowledge of Connection Pooling and how applications access the DBs
through a connection pool.
. SQL - must be a master guru
. Linux/Unix - must be extremely proficient
Required experience:
. 5+ years experience working as a DBA in a technical team. Not only
administration, but data modeling, and SQL as well.
. Experience with Unicode
. Experience writing requirements, functional specifications, and technical
documentation of completed projects
Other Desired Skills:
. Familiar with well-formed XML documents, namespaces, and how to create
dtd's or xsd's (the dtd / xsd creation using a tool like XMLSpy )
. Experience with Trados a plus
. Experience with CMS systems a plus
. Experience with JDBC a plus
. Knowledge of Jakarta DBCP experience a plus.
. Knowledge of Perl/PHP/Java a plus
. Ability to work in multidisciplinary teams with creative staff
. Good communication skills - written and verbal
Educational requirements:
B.S. from a good university in Computer Science preferred - equivalent
experience and certifications OK.
Duration:
3 month with possibility of extension
Job location is 689 Fifth Avenue, NY NY
Compensation: 50 - 60 dollars per hour
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to email***@***.com)
|
| Author |
Message |
the_case_continues

|
Posted: 2004-7-31 1:42:30 |
Top |
database, contrib/xml make error on Mac OS X 10.3.4
This is what happens :
make
gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -I. -I../../src/include -c -o pgxml_dom.o
pgxml_dom.c
pgxml_dom.c:11:26: libxml/xpath.h: No such file or directory
pgxml_dom.c:12:25: libxml/tree.h: No such file or directory
pgxml_dom.c:13:30: libxml/xmlmemory.h: No such file or directory
... followed by several errors & warnings
Any ideas ? I never had any trouble compiling it on OS X 10.1.5
- Joel
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to email***@***.com)
|
| |
|
| |
 |
| |
 |
Index ‹ database |
- Next
- 1
- bufferpool contentHi,
is there any way to know the content of the bufferpool :
- space usage not present in snapshot
- tables actually cached in and number of pages, same for index ...
thx
- 2
- Federated database and host privileges on SYSIBM tablesHi,
at the moment i try to use the federated database feature (DB2/NT 8.2.3)
to use a remote host db2 (DB2 OS/390 7.1.2).
I am unsure what privileges are needed for the host db2 user.
A select on SYSIBM.SYSTABLES and on the tables where the data resides as
mentioned in the following URL is successful.
http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.ii.doc/opt/tlsdb209.htm
But if i try to add a nickname, the following error is returned:
SQL0551N "The ODBC authid " does not have the privilege to perform
operation "unknown " on object "unknown " SQLSTATE=42501
db2diag.log have some more useful output that is attached at the bottom.
According to that output Information Integrator seems to use more SYSIBM
tables to that I dont have access (e.g. SYSIBM.SYSINDEXES). I don't find
them documented in the infocenter, does anyone have a hint to some
documentation about privileges for DRDA data sources for federation?
I'm not sure if the privileges are similar to those of the "Data
Warehouse Center":
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/t0005549.htm
I think its not necessary to have SYSADM or SYSCTRL authorizations. How
can i check for the BINDADD authorization?
Thanks, Michael Rudolph
db2diag.log output:
2006-02-27-17.37.30.014000+060 I18221672H452 LEVEL: Error
PID : 2840 TID : 4276 PROC : db2syscs.exe
INSTANCE: DB2CTLSV NODE : 000 DB : TEST
APPHDL : 0-698 APPID: *LOCAL.DB2CTLSV.060227163636
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:10
MESSAGE : DRDA Server:
DATA #1 : Hexdump, 7 bytes
0x045A3700 : 5345 5344 5244 42 SESDRDB
2006-02-27-17.37.30.024000+060 I18222126H452 LEVEL: Error
PID : 2840 TID : 4276 PROC : db2syscs.exe
INSTANCE: DB2CTLSV NODE : 000 DB : TEST
APPHDL : 0-698 APPID: *LOCAL.DB2CTLSV.060227163636
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:20
MESSAGE : Function name:
DATA #1 : Hexdump, 7 bytes
0x053D1F1C : 646F 5F70 7265 70 do_prep
2006-02-27-17.37.30.024000+060 I18222580H449 LEVEL: Error
PID : 2840 TID : 4276 PROC : db2syscs.exe
INSTANCE: DB2CTLSV NODE : 000 DB : TEST
APPHDL : 0-698 APPID: *LOCAL.DB2CTLSV.060227163636
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:30
MESSAGE : ODBC native err:
DATA #1 : Hexdump, 4 bytes
0x087B618C : 2D35 3531 -551
2006-02-27-17.37.30.034000+060 I18223031H451 LEVEL: Error
PID : 2840 TID : 4276 PROC : db2syscs.exe
INSTANCE: DB2CTLSV NODE : 000 DB : TEST
APPHDL : 0-698 APPID: *LOCAL.DB2CTLSV.060227163636
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:40
MESSAGE : ODBC sqlstate:
DATA #1 : Hexdump, 6 bytes
0x087B6BB1 : 3432 3530 3100 42501.
2006-02-27-17.37.30.044000+060 I18223484H1196 LEVEL: Error
PID : 2840 TID : 4276 PROC : db2syscs.exe
INSTANCE: DB2CTLSV NODE : 000 DB : TEST
APPHDL : 0-698 APPID: *LOCAL.DB2CTLSV.060227163636
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:50
MESSAGE : ODBC error txt:
DATA #1 : Hexdump, 169 bytes
0x087B67B0 : 5B49 424D 5D5B 434C 4920 4472 6976 6572 [IBM][CLI Driver
0x087B67C0 : 5D5B 4442 325D 2053 514C 3035 3531 4E20 ][DB2] SQL0551N
0x087B67D0 : 2022 5255 444F 4C50 4822 2076 6572 66FC "RUDOLPH" verf.
0x087B67E0 : 6774 206E 6963 6874 20FC 6265 7220 6469 gt nicht .ber di
0x087B67F0 : 6520 4265 7265 6368 7469 6775 6E67 2C20 e Berechtigung,
0x087B6800 : 6469 6520 4F70 6572 6174 696F 6E20 2253 die Operation "S
0x087B6810 : 454C 4543 5422 2066 FC72 2064 6173 204F ELECT" f.r das O
0x087B6820 : 626A 656B 7420 2253 5953 4942 4D2E 5359 bjekt "SYSIBM.SY
0x087B6830 : 5349 4E44 4558 4553 2022 2061 7573 7A75 SINDEXES " auszu
0x087B6840 : 66FC 6872 656E 2E20 2053 514C 5354 4154 f.hren. SQLSTAT
0x087B6850 : 453D 3432 3530 310D 0A E=42501..
- 3
- Repeated VACUUM reports same number of deleted rowsPostgresql 7.4.5
The following VACUUMs were run within a couple of minutes of each other completing.
This table concerned is a table that has not been changed in a long time. (a month)
There were open transactions at the time the vacuum was run. These were created by having PHP running with
postgresql. At least that is what I have managed to find so far. and disabling PHP in apache removes them.
postgres 7588 0.0 0.4 50324 3168 ? S Sep28 0:00 postgres: postgres sqlfilter 10.0.0.5 idle in transaction
postgres 7589 0.0 0.4 50324 3172 ? S Sep28 0:00 postgres: postgres sqlfilter 10.0.0.5 idle in transaction
Should VACUUM report the rows as deleted or say they could not be deleted?
Why does it report the same information for three runs in a row?
Or is something else going on that I don't understand.
Regards
Russell Smith
sqlfilter=# vacuum verbose filter.access_log_big
sqlfilter-# ;
INFO: vacuuming "filter.access_log_big"
INFO: index "access_log_url" now contains 5159204 row versions in 74984 pages
DETAIL: 21455 index pages have been deleted, 20000 are currently reusable.
CPU 5.16s/0.69u sec elapsed 650.85 sec.
INFO: index "access_log_whenwho" now contains 5159204 row versions in 58292 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 5.39s/0.68u sec elapsed 615.43 sec.
INFO: index "access_log_time" now contains 5159204 row versions in 38063 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 3.34s/0.46u sec elapsed 259.59 sec.
INFO: index "accesslogbig_domain" now contains 5159204 row versions in 25501 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 2.17s/0.24u sec elapsed 56.53 sec.
INFO: "access_log_big": found 0 removable, 5159204 nonremovable row versions in 175418 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19262 unused item pointers.
0 pages are entirely empty.
CPU 21.06s/2.60u sec elapsed 1662.62 sec.
VACUUM
Time: 1662627.077 ms
sqlfilter=# vacuum verbose filter.access_log_big;
INFO: vacuuming "filter.access_log_big"
INFO: index "access_log_url" now contains 5159204 row versions in 74984 pages
DETAIL: 21455 index pages have been deleted, 20000 are currently reusable.
CPU 5.57s/0.64u sec elapsed 655.85 sec.
INFO: index "access_log_whenwho" now contains 5159204 row versions in 58292 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 5.54s/0.52u sec elapsed 589.95 sec.
INFO: index "access_log_time" now contains 5159204 row versions in 38063 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 3.30s/0.38u sec elapsed 262.43 sec.
INFO: index "accesslogbig_domain" now contains 5159204 row versions in 25501 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 2.37s/0.20u sec elapsed 54.98 sec.
INFO: "access_log_big": found 0 removable, 5159204 nonremovable row versions in 175418 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19262 unused item pointers.
0 pages are entirely empty.
CPU 21.20s/2.36u sec elapsed 1647.25 sec.
VACUUM
Time: 1647292.681 ms
sqlfilter=# commit;
WARNING: there is no transaction in progress
COMMIT
Time: 47.537 ms
sqlfilter=# vacuum verbose filter.access_log_big;
INFO: vacuuming "filter.access_log_big"
INFO: index "access_log_url" now contains 5159204 row versions in 74984 pages
DETAIL: 21455 index pages have been deleted, 20000 are currently reusable.
CPU 4.95s/0.68u sec elapsed 648.90 sec.
INFO: index "access_log_whenwho" now contains 5159204 row versions in 58292 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 5.29s/0.68u sec elapsed 605.39 sec.
INFO: index "access_log_time" now contains 5159204 row versions in 38063 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 3.58s/0.42u sec elapsed 250.08 sec.
INFO: index "accesslogbig_domain" now contains 5159204 row versions in 25501 pages
DETAIL: 0 index pages have been deleted, 0 are currently reusable.
CPU 2.13s/0.29u sec elapsed 55.05 sec.
INFO: "access_log_big": found 0 removable, 5159204 nonremovable row versions in 175418 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19262 unused item pointers.
0 pages are entirely empty.
CPU 20.89s/2.58u sec elapsed 1658.31 sec.
VACUUM
Time: 1658431.580 ms
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
- 4
- pg_arch.c call to sleep()
We have the following warning on Windows:
pgarch.c:349: warning: implicit declaration of function `sleep'
To fix it we could include the right header (which appears to be
<stdlib.h> in the Windows/Mingw case), or we could replace the call by a
call to pg_usleep().
I'm inclined to do the latter, on grounds of consistency, but want to be
sure that it will get the signal handling right.
Unless I hear squawks of objection I will supply a patch for that soon.
cheers
andrew
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
- 5
- expanding a default valueAn apple farmer has several farms and at them, numbered boxes to hold
the fruit. The boxes can be numbered 1-99. The farmer has two
tables to keep track of the fruit, one that tells what fruit the box
is supposed to carry, and the other to tell how much fruit weight the
box is carrying. Since almost every box that contains fruit contains
apples, that is the default fruit indicated by box number 0. There
isn't a box 0, but every box that is not listed for some other fruit
is assumed to be for apples. Sometimes he has one or two plum and
pear boxes. His table of boxes, then is as follows:
BOX-FRUIT TABLE:
FARM BOX FRUIT
1 0 macintosh
1 59 pear
1 60 pear
1 91 plum
1 92 plum
1 96 pear
2 0 golden_del
2 60 pear
2 71 plum
2 91 plum
2 98 pear
3 0 red_del
3 1 plum
3 2 plum
3 96 pear
So every box on farm 1 except for 59,60,91,92, and 96 will contain
macintosh if it contains fruit. The following table tells if the box
actually contains fruit by the fact that there is weight value. A box
that is designated for a fruit does not necessarily have fruit in it.
A box that has a fruit weight but is not designated with a type of
fruit actually has the 0 box fruit in it (some type of apple).
BOX WEIGHT TABLE:
FARM BOX WEIGHT
1 1 13
1 2 12
1 3 13
1 59 14
1 65 15
1 91 10
1 96 17
1 99 19
2 1 12
2 2 14
3 1 17
3 2 13
3 3 14
The question is, how do I join the box_fruit table to the box_weight
table so that the box_weight table as a forth column indicating the
fruit type?
Thanks for your help.
Greg
- 6
- Postgres 7.4 : ECPG not Thread-safeThis is a multi-part message in MIME format.
Hi,
This is the wrong mailing list but I don't sent it to pgsql-bugs with
success.
X-Mozilla-Status2: 00000000
Message-ID: <email***@***.com>
Date: Thu, 09 Oct 2003 09:57:44 +0200
From: Thierry Missimilly <email***@***.com>
Organization: BSIS/R&D
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: fr,en
MIME-Version: 1.0
To: email***@***.com
Subject: Postgres 7.4 : ECPG not Thread-safe
Content-Type: multipart/mixed;
boundary="------------4B046DC6EC4BC94B368C82BA"
This is a multi-part message in MIME format.
--------------4B046DC6EC4BC94B368C82BA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Thierry Missimilly
Your email address : email***@***.com
System Configuration
---------------------
Architecture (example: Intel Pentium) : Pentium IV 1.8 Ghz
Operating System (example: Linux 2.0.26 ELF) : Linux Red Hat 7.3
PostgreSQL version (example: PostgreSQL-7.3): PostgreSQL-7.4Beta2 &
Beta4
Compiler used (example: gcc 2.95.2) : gcc 2.96
Please enter a FULL description of your problem:
------------------------------------------------
I think i have a Thread-safe problem. PostgreSQL developpers will find a
test program to reproduce it on their lab.
I have, already sent this to pgsql-general and pgsql-hacker, but get
back not answers. But neve mind.
I've built Postgresql with the option --enable-thread-safety --with-tcl.
And now run a pgbench like program call pgbch.pgc (attached with this
mail).
The main differences of pgbch.pgc are :
1) Pro*c code
2) Multi-threaded
3) Some specific code for Oracle
4) Some specific dynamic trace for debug
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
To compile :
--------------
ecpg -o pgbhc.c pgbch.pgc
cc -g -D_THREAD_SAFE -D_REENTRANT -I /usr/local/pgsql/include -L
/usr/local/pgsql/lib -lpthread
-lecpg -o pgbch pgbch.c
To execute :
-------------
pgbch -i base_s1
pgbch -c3 -t10 base_s1
(you can add -d10 to have debug traces)
Well, the problem is that sometime pgbch hang. Run it 3 or 4 times and
it will hang.
I don't know if it is really link to Postgres and ECPG but if you
modifiy pgbch.pgc in the way that the
transaction is limited to "BEGIN; END; ", it will never hang.
pgbch with 3 clients means 4 processes, but when then hang occurs,
generally, one client has finished
its 10 transactions and there still are 3 processes.
A look at gdb (gdb pgbch <pid>) gives (See the attach file pgbch.gdb) :
1) The main thread is in pthread_join() waitting for the 2 other child
threads.
2) One thread has finished, but is hanged in pqSocketPoll()
3) The last other thread is waitting to start running in
__pthread_manager()
Well, i'm not an expert in Linux multi-thread, but it seems the thread
(2) is waitting from a message
from the postgresql backend which never comes and therefore blocks the
others threads.
I hope this will help to give back Postgres 7.4 more robust.
You will find attached the pgbch.pgc source and pgbch.gdb trace get on
Postgresql-7.4beta2
(they are the same with Postgresql-7.4Beta4)
Thierry Missimilly
--------------4B046DC6EC4BC94B368C82BA
Content-Type: text/plain; charset=us-ascii;
name="pgbch.pgc"
Content-Disposition: inline;
filename="pgbch.pgc"
Content-Transfer-Encoding: 7bit
/*
* $Header: /home/projects/pgsql/cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.8 2001/02/10 02:31:25 tgl Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
*
* Copyright (c) 2000 Tatsuo Ishii
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
* copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of the
* author not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. The author makes no representations about the
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
VERSION 3.2 */
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#ifdef WIN32
#include "win32.h"
#else
#include <sys/time.h>
#include <unistd.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
/* for getrlimit */
#include <sys/resource.h>
#endif /* WIN32 */
/********************************************************************
* some configurable parameters */
exec sql include sqlca;
#ifdef ORACLE
#define EXIT_THREAD(a) return(NULL)
#else
#define EXIT_THREAD(a) pthread_exit(NULL) //return(NULL)
#endif
#define MAXCLIENTS 1024 /* max number of clients allowed */
#define a_result char
int nclients = 1;/* default number of simulated clients */
int ncli_connected ;/* Connected clients */
int nb_sql_failed ;/* nb SQL failed */
int num_cli = 0;
int nxacts = 10;/* default number of transactions per Clients */
/*
* scaling factor. for example, tps = 10 will make 1000000 tuples of
* accounts table.
*/
typedef struct
{
int finish;
char name[32];
} st_connection;
int tps = 1;
int gi_debug = 0; /* debug flag */
char *gdbName;
st_connection gtab_cnx[MAXCLIENTS];
#ifdef NO_USED
int gi_break = 0;
#endif
#ifdef ORACLE
sql_context tab_ctx[MAXCLIENTS];
#endif
/*
* end of configurable parameters
*********************************************************************/
#define nbranches 1
#define ntellers 10
#define naccounts 100000
typedef struct
{
int etat; /* etat No. */
int cnt; /* xacts count */
int aid; /* account id for this transaction */
int bid; /* branch id for this transaction */
int tid; /* teller id for this transaction */
int delta;
int abalance;
} Client_State;
char command[128];
/*===========================*/
#ifndef ORACLE
static void
doBegin(pnum_thread)
int pnum_thread;
/*===========================*/
{
exec sql begin work;
if ( gi_debug > 9 )
{
fprintf (stderr, "... Begin work");
if ( pnum_thread >= 0 )
fprintf (stderr, " for client %d\n", pnum_thread);
else
fprintf (stderr, "\n");
}
}
#endif
/*===========================*/
static void
doCommit( pnum_thread )
int pnum_thread;
/*===========================*/
{
exec sql commit ;
if ( gi_debug> 9 )
{
fprintf (stderr, "... Commited");
if ( pnum_thread >= 0 )
fprintf (stderr, " for client %d\n", pnum_thread);
else
fprintf (stderr, "\n");
}
}
/*===========================*/
static int
doDisconnect( cnx_name )
char *cnx_name;
/*===========================*/
{
exec sql begin declare section;
char pg_cnx_name[32];
exec sql end declare section;
strcpy(pg_cnx_name,cnx_name);
#ifndef ORACLE
if (gi_debug> 9 )
fprintf(stderr, "-> exec sql disconnect %s\n",cnx_name);
exec sql disconnect :pg_cnx_name;
#endif
}
/*===========================*/
static int
#ifdef ORACLE
doConnect( cnx_name , ctx )
char *cnx_name;
sql_context ctx;
#else
doConnect( cnx_name )
char *cnx_name;
#endif
/*===========================*/
{
exec sql begin declare section;
char connection[32];
char pg_cnx_name[32];
exec sql end declare section;
strcpy(connection,gdbName);
strcpy(pg_cnx_name,cnx_name);
if (gi_debug> 9 )
fprintf(stderr, "-> exec sql connect to %s as %s\n",gdbName,cnx_name);
#ifdef ORACLE
/*--> exec sql context use :ctx; <--*/
strcpy (connection,"scott/tiger");
EXEC SQL CONNECT :connection;
#else
exec sql connect to :connection as :pg_cnx_name;
#endif
if ( sqlca.sqlcode < 0 )
{
if (gi_debug> 9 )
fprintf(stderr, "*** pgbch:Connection to '%s' failed.\n", gdbName);
return ( sqlca.sqlcode );
}
return(0); /* connection successful */
}
#ifdef NO_USED
/*===========================*/
static void printerr(sqlcb)
struct sqlca sqlcb;
/*===========================*/
{
if ( sqlcb.sqlcode < 0 )
{
nb_sql_failed++;
#ifdef NO_USED
gi_break=2;
#endif
fprintf(stderr, "*** Exec SQL failed. ***\n");
}
}
#endif
/*===========================*/
#ifndef ORACLE
static void printwarn(void)
/*===========================*/
{
if (sqlca.sqlwarn[0]) printf("sqlca.sqlwarn: %c",sqlca.sqlwarn[0]);
else return;
if (sqlca.sqlwarn[1]) putchar('1');
if (sqlca.sqlwarn[2]) putchar('2');
putchar('\n');
}
#endif
/*===========================*/
static void
usage()
/*===========================*/
{
fprintf(stderr, "usage: pgbench [-h hostname][-p port][-c nclients][-t ntransactions][-s scaling_factor][-n][-v][-S][-d][dbname]\n");
fprintf(stderr, "(initialize mode): pgbench -i [-h hostname][-p port][-s scaling_factor][-d][dbname]\n");
}
/*===========================*/
/* random number generator */
static int
getrand(int min, int max)
/*===========================*/
{
return (min + (int) (max * 1.0 * rand() / (RAND_MAX + 1.0)));
}
/*===========================*/
/* process a transaction */
static void *
doOne( void * arg )
/*===========================*/
{
Client_State st;
char sql[256];
int iret=0;
int i_am_done=0;
int numero_thread=(int) arg;
exec sql begin declare section;
char text[16];
char text1[16];
char text2[16];
char text3[16];
exec sql end declare section;
if (gi_debug> 9 )
fprintf(stderr, "### client %d connecting to %s\n", numero_thread, gdbName);
fflush(stderr);
sprintf(gtab_cnx[numero_thread].name,"CNX_%d", numero_thread);
#ifdef ORACLE
/*--> exec sql context allocate :tab_ctx[numero_thread]; <--*/
if ( gi_debug > 9 )
fprintf (stderr,"allocate ctx %d\n", numero_thread);
iret=doConnect (gtab_cnx[numero_thread].name, tab_ctx[numero_thread]);
#else
iret=doConnect (gtab_cnx[numero_thread].name);
#endif
if ( iret )
{
ncli_connected--;
fprintf(stderr, "*** FATAL CLIENT %d CAN NOT CONNECT TO DB=%s\n",
numero_thread, gdbName);
fflush(stderr);
gtab_cnx[numero_thread].finish=0;
#ifdef NO_USED
gi_break=1;
#endif
EXIT_THREAD(arg);
}
#ifdef NO_USED
sleep(1);
#endif
if ( gi_debug > 0 )
fprintf(stderr, " CLIENT %d CONNECTED TO DB=%s\n",
numero_thread, gdbName);
#ifdef ORACLE
/*--> exec sql context use :tab_ctx[numero_thread]; <--*/
#endif
for(;;)
{
switch (st.etat)
{
case 0: /* about to start */
strcpy(sql, "begin");
st.aid = getrand(1, naccounts * tps);
st.bid = getrand(1, nbranches * tps);
st.tid = getrand(1, ntellers * tps);
st.delta = getrand(1, 1000);
#ifndef ORACLE
doBegin(numero_thread);
#endif
break;
case 1:
sprintf(sql, "update accounts set abalance = abalance + %d where aid = %d\n", st.delta, st.aid);
sprintf(text,"%d",st.delta);
sprintf(text1,"%d",st.aid);
exec sql update accounts set abalance = abalance + :text where aid = :text1;
break;
case 2:
sprintf(sql, "select abalance from accounts where aid = %d", st.aid);
sprintf(text,"%d", st.aid);
exec sql select abalance from accounts where aid = :text;
break;
case 3:
sprintf(sql, "update tellers set tbalance = tbalance + %d where tid = %d\n",
st.delta, st.tid);
sprintf (text,"%d",st.delta);
sprintf (text1,"%d",st.tid);
exec sql update tellers set tbalance = tbalance + :text where tid = :text1;
break;
case 4:
sprintf(sql, "update branches set bbalance = bbalance + %d where bid = %d", st.delta, st.bid);
sprintf (text,"%d",st.delta);
sprintf (text1,"%d",st.bid);
exec sql update branches set bbalance = bbalance + :text where bid = :text1;
break;
case 5:
sprintf(sql, "insert into history(tid,bid,aid,delta,mtime) values(%d,%d,%d,%d,'now')",
st.tid, st.bid, st.aid, st.delta);
sprintf (text,"%d",st.tid);
sprintf (text1,"%d",st.bid);
sprintf (text2,"%d",st.aid);
sprintf (text3,"%d",st.delta);
exec sql insert into history(tid,bid,aid,delta,mtime)
values(:text, :text1, :text2, :text3,'now');
break;
case 6:
strcpy(sql, "end");
doCommit(numero_thread);
if (++st.cnt >= nxacts)
{
/* I've done */
gtab_cnx[numero_thread].finish=0;
if (gi_debug > 0)
{
fprintf(stderr, " CLIENT %d ENDED\n", numero_thread);
fflush(stderr);
}
EXIT_THREAD(arg);
}
break;
}
#ifdef DO_IT
+ifdef NO_USED
sleep(1);
#endif
if (gi_debug > 9)
fprintf(stderr, "client %d sending %s\n", numero_thread, sql);
/* increment etat counter */
st.etat++;
if (st.etat > 6)
st.etat = 0;
}
} /* End of doOne */
/*===========================*/
static void
#ifdef ORACLE
init(ctx)
sql_context ctx;
#else
init()
#endif
/*===========================*/
{
exec sql begin declare section;
int i;
char text[16];
char text1[16];
exec sql end declare section;
char cnx_name[32];
int iret = -1;
strcpy(cnx_name, "cnx_init");
#ifdef ORACLE
/*--> exec sql context use :ctx; <--*/
iret = doConnect (cnx_name, ctx);
#else
iret = doConnect (cnx_name);
#endif
if ( iret )
{
fprintf(stderr, "*** FATAL init can not connect to DB=%s\n", gdbName);
fflush(stderr);
return;
}
fprintf(stderr, "-> Begin creating ...\n");
exec sql drop table branches;
exec sql create table branches (
"bid" int primary key,
"bbalance" int,
"filler" char(88));
fprintf(stderr, "tables branches created ...\n");
exec sql drop table tellers;
exec sql create table tellers(
tid int primary key,
bid int,
tbalance int,
filler char(84));
fprintf(stderr, "tables tellers created...\n");
exec sql drop table accounts;
exec sql create table accounts(
aid int primary key,
bid int,
abalance int,
filler char(84));
fprintf(stderr, "tables accounts created ...\n");
exec sql drop table history;
exec sql create table history(
tid int,
bid int,
aid int,
delta int,
mtime timestamp,
filler char(22));
fprintf(stderr, "tables history created ...\n");
fprintf(stderr, "-> Create Tables done ...\n");
for (i = 0; i < nbranches * tps; i++)
{
sprintf(command, "insert into branches (bid,bbalance) values(%d,0)", i+1);
sprintf( text, "%d", i+1);
exec sql insert into branches(bid,bbalance) values(:text,0);
}
for (i = 0; i < ntellers * tps; i++)
{
sprintf(command, "insert into tellers(tid,bid,tbalance) values (%d,%d,0)" ,i + 1, i / ntellers + 1);
sprintf(text,"%d",i+1);
sprintf(text1,"%d",i-1/ntellers+1);
i+1;
exec sql insert into tellers(tid,bid,tbalance) values(:text,:text1,0);
}
for (i = 0; i < naccounts * tps; i++)
{
int j = i + 1;
sprintf (text,"%d", j);
sprintf (text1,"%d", j/ naccounts);
exec sql insert into accounts(aid,bid,abalance) values(:text,:text1,0);
if (j % 10000 == 0)
{
/*
* every 10000 tuples, we commit the copy command. this should
* avoid generating too much WAL logs
*/
fprintf(stderr, "%d tuples done.\n", j);
}
}
doCommit(-1);
doDisconnect ( cnx_name );
#ifdef ORACLE
/*--> exec sql context free :tab_ctx[0]; <--*/
#endif
fprintf(stderr, "done init !");
} /* Fin init */
/*===========================*/
/* print out results */
static void
printResults(
int ttype, Client_State * process,
struct timeval * tv1, struct timeval * tv2,
struct timeval * tv3)
/*===========================*/
{
double t1,
t2;
int i;
int normal_xacts = 0;
normal_xacts = nclients*nxacts ;
t1 = (tv3->tv_sec - tv1->tv_sec) * 1000000.0 + (tv3->tv_usec - tv1->tv_usec);
t1 = nxacts*ncli_connected * 1000000.0 / t1;
t2 = (tv3->tv_sec - tv2->tv_sec) * 1000000.0 + (tv3->tv_usec - tv2->tv_usec);
t2 = nxacts*ncli_connected * 1000000.0 / t2;
printf("****************************************************************\n");
printf("transaction type: %s\n", ttype == 0 ? "TPC-B (sort of)" : "SELECT only");
printf("scaling factor: %d\n", tps);
printf("number of clients: %d\n", nclients);
printf("number of clients connected: %d\n", ncli_connected);
printf("number of transactions per client: %d\n", nxacts);
printf("number of transactions actually processed: %d/%d\n", nxacts*ncli_connected - nb_sql_failed, normal_xacts);
printf("tps = %f(including connections establishing)\n", t1);
printf("tps = %f(excluding connections establishing)\n", t2);
printf("****************************************************************\n");
} /* Fin print_resu */
/*===========================*/
int
main(int argc, char **argv)
/*===========================*/
{
extern char *optarg;
extern int optind,
opterr,
optopt;
int c;
char *pghost = NULL;
char *pgport = NULL;
int is_init_mode = 0; /* initialize mode? */
int is_no_vacuum = 0; /* no vacuum at all before */
int is_drop = 0; /* no drop before */
int is_full_vacuum = 0; /* do full vacuum before testing? */
int ttype = 0; /* transaction type. 0: TPC-B, 1: SELECT
* only */
static Client_State process[MAXCLIENTS]; /* clients status */
struct timeval tv1; /* start up time */
struct timeval tv2; /* after establishing all connections to
* the backend */
struct timeval tv3; /* end time */
int i;
int i_fois=0;
int i_encours=0;
int iret;
pthread_t thread[MAXCLIENTS];
pthread_attr_t thread_attr;
#ifdef NO_USED
exec sql whenever sqlerror do printerr(sqlca);
#endif
exec sql whenever sqlerror do printwarn();
#ifndef ORACLE
exec sql whenever not found sqlprint;
exec sql whenever sqlwarning do printwarn();
#endif
#ifdef ORACLE
/*--> exec sql enable threads; <--*/
#endif
while ((c = getopt(argc, argv, "ih:nNvp:d:c:C:t:s:S")) != EOF)
{
switch (c)
{
case 'i':
is_init_mode++;
break;
case 'h':
pghost = optarg;
break;
case 'N':
is_drop++;
break;
case 'n':
is_no_vacuum++;
break;
case 'v':
is_full_vacuum++;
break;
case 'p':
pgport = optarg;
break;
case 'd':
gi_debug = atoi(optarg);
break;
case 'S':
ttype = 1;
break;
case 'C':
num_cli = atoi(optarg);
break;
case 'c':
nclients = atoi(optarg);
ncli_connected = nclients;
if (nclients <= 0 || nclients > MAXCLIENTS)
{
fprintf(stderr, "wrong number of clients: %d\n", nclients);
exit(1);
}
break;
case 's':
tps = atoi(optarg);
if (tps <= 0)
{
fprintf(stderr, "wrong scaling factor: %d\n", tps);
exit(1);
}
break;
case 't':
nxacts = atoi(optarg);
if (nxacts <= 0)
{
fprintf(stderr, "wrong number of transactions: %d\n", nxacts);
exit(1);
}
break;
default:
usage();
exit(1);
break;
} /* switch */
} /* Fin du traitement */
if (argc > optind)
gdbName = argv[optind];
else
{
gdbName = getenv("USER");
if (gdbName == NULL)
gdbName = "";
}
if (is_init_mode)
{
#ifdef ORACLE
/*--> exec sql context allocate :tab_ctx[0]; <--*/
init(tab_ctx[0]);
#else
init();
#endif
exit(0);
}
if (gi_debug > 9)
{
printf("pghost: %s pgport: %s nclients: %d nxacts: %d dbName: %s\n",
pghost, pgport, nclients, nxacts, gdbName);
}
/*
* get the scaling factor that should be same as count(*) from
* branches...
*/
if (is_drop)
{
#ifdef ORACLE
/*--> exec sql context allocate :tab_ctx[0]; <--*/
/*--> exec sql context use :tab_ctx[0]; <--*/
#endif
fprintf(stderr, "starting drop...");
exec sql drop table branches;
exec sql drop table tellers;
exec sql drop table accounts;
exec sql drop table history;
exec sql commit;
} /* Fin du traitement si pas d option -n */
for (i = 0; i < nclients ; i++)
gtab_cnx[i].finish=1;
/* set random seed */
gettimeofday(&tv1, 0);
srand((uint) tv1.tv_usec);
/*====== CREATE THE THREADS ============================*/
/* get start up time */
gettimeofday(&tv1, 0);
if ( pthread_attr_init(&thread_attr) )
perror ("pthread_attr_init: ");
if (pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE))
perror("pthread_attr_setdetachstate :");
/* time after connections set up */
gettimeofday(&tv2, 0);
for (i = 0; i < nclients ; i++)
pthread_create (&thread[i], &thread_attr, doOne, (void *) i);
/*====== WAITING THE END OF THREADS ===================*/
for (i = 0; i < nclients ; i++)
{
if (pthread_join (thread[i], NULL))
perror("pthread_join failed by : ");
else
if ( gi_debug > 0)
printf("- thread %d stopped\n", i);
}
/* time after the end of transaction */
gettimeofday(&tv3, 0);
#ifdef ORACLE
/*====== ORACLE: FREE CONTEXT ==========================*/
for (i = 0; i < nclients ; i++)
{
if ( pthread_detach(thread[i]) )
{
if ( gi_debug > 0)
printf(" -> detached thread %d ...", i );
}
else
{
if ( gi_debug > 0)
printf(" -> detached thread %d OK", i );
}
/*--> exec sql context use :tab_ctx[i]; <--*/
exec sql commit work release;
/*--> exec sql context free :tab_ctx[i]; <--*/
if ( gi_debug > 0)
fprintf (stderr," free %d \n", i );
}
#endif /* ORACLE */
/*====== PRINTING OF RESULTS ==========================*/
printResults(ttype, process, &tv1, &tv2, &tv3);
}
--------------4B046DC6EC4BC94B368C82BA
Content-Type: text/plain; charset=us-ascii;
name="pgbch.gdb"
Content-Disposition: inline;
filename="pgbch.gdb"
Content-Transfer-Encoding: 7bit
[postgres@tux3 bao.d]$ gdb pgbch 14728
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Attaching to program: /home/postgres/bao.d/pgbch, process 14728
Reading symbols from /lib/i686/libpthread.so.0...done.
[New Thread 1024 (LWP 14728)]
[New Thread 2049 (LWP 14729)]
[New Thread 2051 (LWP 14732)]
Loaded symbols for /lib/i686/libpthread.so.0
Reading symbols from /usr/local/pgsql/lib/libecpg.so.4...done.
Loaded symbols for /usr/local/pgsql/lib/libecpg.so.4
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /usr/local/pgsql/lib/libpgtypes.so.1...done.
Loaded symbols for /usr/local/pgsql/lib/libpgtypes.so.1
Reading symbols from /usr/local/pgsql/lib/libpq.so.3...done.
Loaded symbols for /usr/local/pgsql/lib/libpq.so.3
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
0x420292e5 in sigsuspend () from /lib/i686/libc.so.6
(gdb) thread 1
[Switching to thread 1 (Thread 1024 (LWP 14728))]#0 0x420292e5 in sigsuspend ()
from /lib/i686/libc.so.6
(gdb) where
#0 0x420292e5 in sigsuspend () from /lib/i686/libc.so.6
#1 0x40031679 in __pthread_wait_for_restart_signal () from /lib/i686/libpthread.so.0
#2 0x4002e85a in pthread_join () from /lib/i686/libpthread.so.0
#3 0x0804a065 in main (argc=9, argv=0xbffff924) at pgbch.pgc:718
#4 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 2049 (LWP 14729))]#0 0x420e0037 in poll ()
from /lib/i686/libc.so.6
(gdb) where
#0 0x420e0037 in poll () from /lib/i686/libc.so.6
#1 0x4002ec70 in __pthread_manager () from /lib/i686/libpthread.so.0
(gdb) thread 3
[Switching to thread 3 (Thread 2051 (LWP 14732))]#0 0x420e0037 in poll ()
from /lib/i686/libc.so.6
(gdb) where
#0 0x420e0037 in poll () from /lib/i686/libc.so.6
#1 0x40063b64 in pqSocketPoll () from /usr/local/pgsql/lib/libpq.so.3
#2 0x40063a85 in pqSocketCheck () from /usr/local/pgsql/lib/libpq.so.3
#3 0x400639b7 in pqWaitTimed () from /usr/local/pgsql/lib/libpq.so.3
#4 0x4006398d in pqWait () from /usr/local/pgsql/lib/libpq.so.3
#5 0x400618f2 in PQgetResult () from /usr/local/pgsql/lib/libpq.so.3
#6 0x40061c4b in PQexecFinish () from /usr/local/pgsql/lib/libpq.so.3
#7 0x4004447d in ECPGexecute () from /usr/local/pgsql/lib/libecpg.so.4
#8 0x400449d8 in ECPGdo () from /usr/local/pgsql/lib/libecpg.so.4
#9 0x080490d8 in doOne (arg=0x1) at pgbch.pgc:326
#10 0x4002efef in pthread_start_thread () from /lib/i686/libpthread.so.0
--------------4B046DC6EC4BC94B368C82BA
Content-Type: text/x-vcard; charset=us-ascii;
name="THIERRY.MISSIMILLY.vcf"
Content-Description: Card for Thierry Missimilly
Content-Disposition: attachment;
filename="THIERRY.MISSIMILLY.vcf"
Content-Transfer-Encoding: 7bit
begin:vcard
n:Missimilly;Thierry
tel;fax:+33 (0)4 76 29 78 78
tel;work:+33 (0)4 76 29 74 54
x-mozilla-html:FALSE
url:http:\\www.bull.com
org:BIS/R&D
adr:;;Bull SA, 1, rue de provence - BP 208;ECHIROLLES;;38432;FRANCE
version:2.1
email;internet:email***@***.com
x-mozilla-cpt:;-18184
fn:Thierry Missimilly
end:vcard
--------------4B046DC6EC4BC94B368C82BA--
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
- 7
- forcing SSLIn order to ensure all user are making SSL connection to the database,
in the file pg_hba.conf, I change all the first columns into "hostssl"
such that there is neither "host" nor "local" left.
However, when I try to use a program written in Tcl to access the
database, even without the option "requiressl=1" for "pg_connect", the
program can still make connection to the database.
(With the option "requiressl=1" present for "pg_connect", my program
can also connect the database successfully)
May I know what the problem is and how to ensure incoming SSL
connection?
Thank you
- 8
- Disable RollbackHi,
Is It possible to disable rollback in Oracle 9i. I am running it
in a loop deleting 2000 records at a time. The maximum performance I
am able to get is 3 lakhs records in 20 minutes. I am looking forward
to 1 million in 10 minutes, but it seem because of rollback been
enabled I am unable to do so. Is there any other
way also to improve the deletion rate.
Thanks,
Tuhin
- 9
- DB2 is waiting for somethingWe got a database that didn't react for minutes. How can I find out what it
is waiting for. Connection monitor shows several Connections in Compiling
state. So it seems that there is an internal lock which blocks the
compilation.
Thanks
Klemens
- 10
- Spilled sortsHi all,
Outside of changing the SQL of the query or creating indexes, what can
one do in order to prevent sort spills. Im thinking along the lines of
the db cfg and dbm cfg files. Ill post the current setup we have of
one database which is having problems with these:
db2 get dbm cfg:
Database manager configuration release level = 0x0a00
CPU speed (millisec/instruction) (CPUSPEED) = 4.723442e-07
Communications bandwidth (MB/sec) (COMM_BANDWIDTH) = 1.000000e+02
Max number of concurrently active databases (NUMDB) = 8
Data Links support (DATALINKS) = NO
Federated Database System Support (FEDERATED) = NO
Transaction processor monitor name (TP_MON_NAME) =
Default charge-back account (DFT_ACCOUNT_STR) =
Java Development Kit installation path (JDK_PATH) =
/usr/java14_64
Diagnostic error capture level (DIAGLEVEL) = 3
Notify Level (NOTIFYLEVEL) = 3
Diagnostic data directory path (DIAGPATH) =
/apps/db2diag/db2inst2
Default database monitor switches
Buffer pool (DFT_MON_BUFPOOL) = ON
Lock (DFT_MON_LOCK) = OFF
Sort (DFT_MON_SORT) = ON
Statement (DFT_MON_STMT) = ON
Table (DFT_MON_TABLE) = OFF
Timestamp (DFT_MON_TIMESTAMP) = ON
Unit of work (DFT_MON_UOW) = ON
Monitor health of instance and databases (HEALTH_MON) = ON
SYSADM group name (SYSADM_GROUP) = DB2GRP1
SYSCTRL group name (SYSCTRL_GROUP) =
SYSMAINT group name (SYSMAINT_GROUP) =
SYSMON group name (SYSMON_GROUP) =
Client Userid-Password Plugin (CLNT_PW_PLUGIN) =
Client Kerberos Plugin (CLNT_KRB_PLUGIN) =
Group Plugin (GROUP_PLUGIN) =
GSS Plugin for Local Authorization (LOCAL_GSSPLUGIN) =
Server Plugin Mode (SRV_PLUGIN_MODE) = UNFENCED
Server List of GSS Plugins (SRVCON_GSSPLUGIN_LIST) =
Server Userid-Password Plugin (SRVCON_PW_PLUGIN) =
Server Connection Authentication (SRVCON_AUTH) =
NOT_SPECIFIED
Database manager authentication (AUTHENTICATION) = SERVER
Cataloging allowed without authority (CATALOG_NOAUTH) = NO
Trust all clients (TRUST_ALLCLNTS) = YES
Trusted client authentication (TRUST_CLNTAUTH) = CLIENT
Bypass federated authentication (FED_NOAUTH) = NO
Default database path (DFTDBPATH) =
/home/db2inst2
Database monitor heap size (4KB) (MON_HEAP_SZ) = 520
Java Virtual Machine heap size (4KB) (JAVA_HEAP_SZ) = 2048
Audit buffer size (4KB) (AUDIT_BUF_SZ) = 0
Size of instance shared memory (4KB) (INSTANCE_MEMORY) = AUTOMATIC
Backup buffer default size (4KB) (BACKBUFSZ) = 1024
Restore buffer default size (4KB) (RESTBUFSZ) = 1024
Sort heap threshold (4KB) (SHEAPTHRES) = 400000
Directory cache support (DIR_CACHE) = YES
Application support layer heap size (4KB) (ASLHEAPSZ) = 15
Max requester I/O block size (bytes) (RQRIOBLK) = 32767
Query heap size (4KB) (QUERY_HEAP_SZ) = 1000
Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10
Priority of agents (AGENTPRI) = SYSTEM
Max number of existing agents (MAXAGENTS) = 400
Agent pool size (NUM_POOLAGENTS) = 160
Initial number of agents in pool (NUM_INITAGENTS) = 0
Max number of coordinating agents (MAX_COORDAGENTS) = (MAXAGENTS -
NUM_INITAGENTS)
Max no. of concurrent coordinating agents (MAXCAGENTS) =
MAX_COORDAGENTS
Max number of client connections (MAX_CONNECTIONS) =
MAX_COORDAGENTS
Keep fenced process (KEEPFENCED) = YES
Number of pooled fenced processes (FENCED_POOL) =
MAX_COORDAGENTS
Initial number of fenced processes (NUM_INITFENCED) = 0
Index re-creation time and redo index build (INDEXREC) = RESTART
Transaction manager database name (TM_DATABASE) = 1ST_CONN
Transaction resync interval (sec) (RESYNC_INTERVAL) = 180
SPM name (SPM_NAME) = hdmcjun1
SPM log size (SPM_LOG_FILE_SZ) = 256
SPM resync agent limit (SPM_MAX_RESYNC) = 20
SPM log path (SPM_LOG_PATH) =
TCP/IP Service name (SVCENAME) = DB2_db2inst2
Discovery mode (DISCOVER) = SEARCH
Discover server instance (DISCOVER_INST) = ENABLE
Maximum query degree of parallelism (MAX_QUERYDEGREE) = 4
Enable intra-partition parallelism (INTRA_PARALLEL) = YES
No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = 4220
Number of FCM request blocks (FCM_NUM_RQB) = AUTOMATIC
Number of FCM connection entries (FCM_NUM_CONNECT) = AUTOMATIC
Number of FCM message anchors (FCM_NUM_ANCHORS) = AUTOMATIC
Node connection elapse time (sec) (CONN_ELAPSE) = 10
Max number of node connection retries (MAX_CONNRETRIES) = 5
Max time difference between nodes (min) (MAX_TIME_DIFF) = 60
db2start/db2stop timeout (min) (START_STOP_TIME) = 10
db2 get db cfg
Database Configuration for Database
Database configuration release level = 0x0a00
Database release level = 0x0a00
Database territory = US
Database code page = 1208
Database code set = UTF-8
Database country/region code = 1
Database collating sequence = BINARY
Alternate collating sequence (ALT_COLLATE) =
Database page size = 4096
Dynamic SQL Query management (DYN_QUERY_MGMT) = DISABLE
Discovery support for this database (DISCOVER_DB) = ENABLE
Default query optimization class (DFT_QUERYOPT) = 5
Degree of parallelism (DFT_DEGREE) = 1
Continue upon arithmetic exceptions (DFT_SQLMATHWARN) = NO
Default refresh age (DFT_REFRESH_AGE) = 0
Default maintained table types for opt (DFT_MTTB_TYPES) = SYSTEM
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
Backup pending = NO
Database is consistent = NO
Rollforward pending = NO
Restore pending = NO
Multi-page file allocation enabled = YES
Log retain for recovery status = NO
User exit for logging status = YES
Data Links Token Expiry Interval (sec) (DL_EXPINT) = 60
Data Links Write Token Init Expiry Intvl(DL_WT_IEXPINT) = 60
Data Links Number of Copies (DL_NUM_COPIES) = 1
Data Links Time after Drop (days) (DL_TIME_DROP) = 1
Data Links Token in Uppercase (DL_UPPER) = NO
Data Links Token Algorithm (DL_TOKEN) = MAC0
Database heap (4KB) (DBHEAP) = 10000
Size of database shared memory (4KB) (DATABASE_MEMORY) = AUTOMATIC
Catalog cache size (4KB) (CATALOGCACHE_SZ) = 717
Log buffer size (4KB) (LOGBUFSZ) = 512
Utilities heap size (4KB) (UTIL_HEAP_SZ) = 290779
Buffer pool size (pages) (BUFFPAGE) = 1000
Extended storage segments size (4KB) (ESTORE_SEG_SZ) = 16000
Number of extended storage segments (NUM_ESTORE_SEGS) = 0
Max storage for lock list (4KB) (LOCKLIST) = 4096
Max size of appl. group mem set (4KB) (APPGROUP_MEM_SZ) = 50000
Percent of mem for appl. group heap (GROUPHEAP_RATIO) = 70
Max appl. control heap size (4KB) (APP_CTL_HEAP_SZ) = 1024
Sort heap thres for shared sorts (4KB) (SHEAPTHRES_SHR) = 25600
Sort list heap (4KB) (SORTHEAP) = 25600
SQL statement heap (4KB) (STMTHEAP) = 4096
Default application heap (4KB) (APPLHEAPSZ) = 1024
Package cache size (4KB) (PCKCACHESZ) = 1600
Statistics heap size (4KB) (STAT_HEAP_SZ) = 20000
Interval for checking deadlock (ms) (DLCHKTIME) = 10000
Percent. of lock lists per application (MAXLOCKS) = 58
Lock timeout (sec) (LOCKTIMEOUT) = -1
Changed pages threshold (CHNGPGS_THRESH) = 45
Number of asynchronous page cleaners (NUM_IOCLEANERS) = 8
Number of I/O servers (NUM_IOSERVERS) = 20
Index sort flag (INDEXSORT) = YES
Sequential detect flag (SEQDETECT) = YES
Default prefetch size (pages) (DFT_PREFETCH_SZ) = 32
Track modified pages (TRACKMOD) = OFF
Default number of containers = 1
Default tablespace extentsize (pages) (DFT_EXTENT_SZ) = 32
Max number of active applications (MAXAPPLS) = AUTOMATIC
Average number of active applications (AVG_APPLS) = 1
Max DB files open per application (MAXFILOP) = 64
Log file size (4KB) (LOGFILSIZ) = 10000
Number of primary log files (LOGPRIMARY) = 100
Number of secondary log files (LOGSECOND) = 150
Changed path to log files (NEWLOGPATH) =
Path to log files =
/appsdata/db2logs/db2inst2/warehous/NODE0000/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0015869.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Percent of max active log space by transaction(MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
Group commit count (MINCOMMIT) = 1
Percent log file reclaimed before soft chckpt (SOFTMAX) = 120
Log retain for recovery enabled (LOGRETAIN) = OFF
User exit for logging enabled (USEREXIT) = OFF
HADR database role = STANDARD
HADR local host name (HADR_LOCAL_HOST) =
HADR local service name (HADR_LOCAL_SVC) =
HADR remote host name (HADR_REMOTE_HOST) =
HADR remote service name (HADR_REMOTE_SVC) =
HADR instance name of remote server (HADR_REMOTE_INST) =
HADR timeout value (HADR_TIMEOUT) = 120
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
First log archive method (LOGARCHMETH1) = TSM:DB2LOGS
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
/appsdata/db2backups/failarch/
Number of log archive retries on error (NUMARCHRETRY) = 5
Log archive retry Delay (secs) (ARCHRETRYDELAY) = 20
Vendor options (VENDOROPT) =
Auto restart enabled (AUTORESTART) = ON
Index re-creation time and redo index build (INDEXREC) = SYSTEM
(RESTART)
Log pages during index build (LOGINDEXBUILD) = OFF
Default number of loadrec sessions (DFT_LOADREC_SES) = 1
Number of database backups to retain (NUM_DB_BACKUPS) = 12
Recovery history retention (days) (REC_HIS_RETENTN) = 366
TSM management class (TSM_MGMTCLASS) =
TSM node name (TSM_NODENAME) =
TSM owner (TSM_OWNER) =
TSM password (TSM_PASSWORD) =
Automatic maintenance (AUTO_MAINT) = OFF
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = OFF
Automatic runstats (AUTO_RUNSTATS) = OFF
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF
- 11
- 7.3.4 -> 7.3.8 - a little stuckHello,
I was using 7.3.4 and decided to upgrade to 7.3.8. I did this via RPMs
for RH9. RPM installed OK, and the migration of data looks like it
worked.
I have one remaining problem: I can start the DB with `pg_ctl -D
/var/lib/pgsql/data start', but I cannot start it with
`/etc/rc.d/init.d/postgresql start'. The error I get is the same one
that I was getting before I 'upgraded' the data:
"An old version of the database format was found.\nYou need to upgrade
the data format before using PostgreSQL.\nSee (Your System's
documentation directory)/postgresql-7.4/README.rpm-dist for more
information."
Does anyone know what I could do to get this to work?
Also:
Although I upgraded to 7.3.8, I saw several incorrect(?) references to
7.4 (e.g. PGVERSION=7.4 in that init script). Mistakes? Should I just
be upgrading to the latest 7.4.* version instead?
To migrate/upgrade the data after the DB install, I followed these
directions:
http://developer.postgresql.org/docs/postgres/migration.html
However, I also had to recreate the user (createuser) and the DB itself
(createdb). Is this normal, or did I do something wrong?
Thank you,
Otis
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
- 12
- HOW TO TURN $6 INTO $6,000!!!!!! READING THIS COULD CHANGE YOUR LIFE!The genius put the names of his accomplices. Wonder if anyone falls
for this. Anyway, I'll gladly send $6 to anyone who throws a rock in a
window at one of these addresses:
> #1) Dennis Couch II 7353 Lucille Ave. Louisville,KY 40258
> #2) Yarcadova Lewinson 3722 E. Grove St. Tampa, Fl 33610
> #3) Devanshu More 12820 Morning Park Circle, Alpharetta,GA 30004
> #4) Josh Lane 2865 Westwood Lane #8 Carmichael, CA 95608
> #5) Del Massey 376 Stones River Cv. Nashville, TN 37214
> #6) Bryan Manson 4620 14 St. NW. Calgary, Alberta, Canada. T2K 1J6
Daniel
- 13
- LOCATE function bug?Hello.
v8.2.1
Try this (and any 3-d argument):
---
select locate('','string',5) from sysibm.sysdummy1;
---
Is it a feature or a bug?
Sincerely,
Mark B.
- 14
- physical layout of dataI have two questions (or comment want to confirm):
1. the SecondaryDatabase is actually implemented as a non-clusterred
key that will not decide the physical layout of the db in any way.
2. how could I decide the size of tuples in memory? say, if i have
an Integer as key, and Integer as data, how many records I will have
by one page load from disk? (i.e., the size of unit to be fetched
into memory each time).
thanks a lot
Huaxin
- 15
- problems in vacuumdb.1This is automatically generated email about problems in a man page for which
you appear to be responsible. If you are not the right person or list, tell
me and I will attempt to correct my database.
See http://catb.org/~esr/doclifter/problems.html for details on how and
why these patches were generated. Feel free to email me with any questions.
Note: These patches do not change the mod date of any manual page. You
may wish to do that by hand.
Problems with vacuumdb.1:
1. Broken command synopsis syntax. This may mean you're using a
construction in the command synopsis other than the standard
[ ] | { }, or it may mean you have running text in the command synopsis
section (the latter is not technically an error, but it's impossible
to translate into DocBook markup).
--- vacuumdb.1-orig 2004-07-29 09:57:38.442563992 -0400
+++ vacuumdb.1 2004-07-29 09:57:55.544964032 -0400
@@ -5,7 +5,7 @@
.SH SYNOPSIS
.sp
-\fBvacuumdb\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fR[\fR \fB--full\fR\fR | \fR\fB-f\fR\fR ]\fR \fR[\fR \fB--verbose\fR\fR | \fR\fB-v\fR\fR ]\fR \fR[\fR \fB--analyze\fR\fR | \fR\fB-z\fR\fR ]\fR\fR [ \fR\fB--table | -t \fItable\fB\fR [ \fB( \fIcolumn\fB [,...] ) \fR]\fB \fR\fR]\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR
+\fBvacuumdb\fR\fR [ \fR\fB\fIconnection-option\fB\fR...\fB \fR\fR]\fR \fR[\fR \fB--full\fR\fR | \fR\fB-f\fR\fR ]\fR \fR[\fR \fB--verbose\fR\fR | \fR\fB-v\fR\fR ]\fR \fR[\fR \fB--analyze\fR\fR | \fR\fB-z\fR\fR ]\fR\fR [ \fR\fB--table | -t \fItable\fB\fR [ \fBcolumnspecs \fR]\fB \fR\fR]\fR\fR [ \fR\fB\fIdbname\fB \fR\fR]\fR
\fBvacuumdb\fR\fR [ \fR\fB\fIconnection-options\fB\fR...\fB \fR\fR]\fR \fR[\fR \fB--all\fR\fR | \fR\fB-a\fR\fR ]\fR \fR[\fR \fB--full\fR\fR | \fR\fB-f\fR\fR ]\fR \fR[\fR \fB--verbose\fR\fR | \fR\fB-v\fR\fR ]\fR \fR[\fR \fB--analyze\fR\fR | \fR\fB-z\fR\fR ]\fR
.SH "DESCRIPTION"
-----------------------------
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to email***@***.com)
|
|
|