I am using POSTGRES 10.6 compiled on AIX 7.1
I am getting error XX000 when trying to perform an update.
I am using C code using libpq libraries in my code. See below error in the postgres log file.
I found that the error is issued from postgres source file:
src/backend/storage/lmgr/lwlock.c (line 1731)
Do you have any idea what can be causing this error?
2019-03-21 09:08:48 EDT postgres> ERROR: lock buffer_content is not held
2019-03-21 09:08:48 EDT postgres> STATEMENT: insert into mxrmen_rec values ($1,$2,$3,$4,$5,$6,
$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,
$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,
$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71,$72,$73,
$74,$75,$76)
I appreciate any help. Let me know if you need more information
Thank you
Faouzi
Related
I've had problems to execute pg_restorecommand in Mac.
It's returning this error:
pg_restore: [compress_io] could not uncompress data: invalid code lengths set
I'm using postgres 9.6.2.
That error message comes from the zlib library used by PostgreSQL for compression.
I'd say that the file probably got corrupted (ASCII file transfer?).
I am working on a remote red-hat server and there I'm developing a c application to insert data in to a remote oracle database. So first i installed the OCI instant client rpm on the server and tried to compile a sample program. after certain linkages I could compile it. But then when I am going to run it. It exits giving an error saying
ORA-12162: TNS:net service name is incorrectly specified
The sample code I used is from the blog (refer to this code in case you need to clarify the things.where I’m quoting only few pieces to this post) René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle
(refer to this code in case you need to clarify the things.where I’m quoting only few pieces to this post)
In the code I added some prints to check for the error And it seems like It gets stuck in the OCIServerAttach() function r gives a printed walue of -1
r=OCIServerAttach(srv, err, dbname, strlen(dbname), (ub4) OCI_DEFAULT);
printf("r value %d",r);
if (r != OCI_SUCCESS) {
checkerr(err, r);
goto clean_up;
}
Another point is that in the compilation process it gives a warning saying that a certain libry is not include. but the exicutable file is created. Here is the massage I get in the compilation process.
[laksithe#loancust ~]$ gcc -L$ORACLE_HOME/lib/ -L$ORACLE_HOME/rdbms/lib/ -o oci_test oci_test.o -L/usr/lib/oracle/12.1/client64/lib -lclntsh `cat $ORACLE_HOME/lib/sysliblist`
cat: /lib/sysliblist: No such file or directory
Going through the web I found that by creating a tnsnames.ora file with the connection details I could solve the problem. But even It didn't work for me. Here is the link for that blog blog
It has been a week since this error and I cold'nt solve it. could someone please help me.
connection string format I used is abc.ghi.com:1521/JKLMN
My recommendation is to bypass tnsnames completely. Oracle has always allowed you to put in the direct connection details, but EZConnect makes that even easier.
When you format your connection string, instead of listing the TNS name, use the actual connection properties in the following format:
servername:port/service name
For Example
MyOracle.MyCompany.Com:1521/SalesReporting
Your connection string might also require direct=true, but I'm honestly not sure.
I like the idea of tnsnames, but it's a double edged sword. When it works, it's great. When it doesn't, you want to throw something. With EZConnect, it always works.
By the way, if you don't know the properties of the three items above, find a machine that connect via tnsnames and:
tnsping <your TNS-named database>
I'm trying to retrieve a file from an instance using libssh2 scp.
Just to make sure that my username, password, and keys are correct, I did:
sudo scp -v -P #port -i /home/username/.ssh/id_rsa username#XX.XX.XX.XX:/home/username/file .
Which asked me for the password, and then retrieved the file successfully.
In trying to accomplish the same thing with libssh2, I followed the example here:
http://www.libssh2.org/examples/scp.html
With superficial changes to variable types that seem to have since changed
(Not that it should matter, as those variables come after authentication).
However, on
libssh2_userauth_publickey_fromfile(session, username,"/home/username/.ssh/id_rsa.pub","/home/username/.ssh/id_rsa",password)
The program always exits with a LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED.
Checking using gdb, I'm certain that the username and passwords being applied are correct.
What reasons might there be that are causing this problem?
Edit:
Further delving with GDB reveals that somewhere in the depth of libssh2_userauth_publickey_fromfile(), in _libssh2_userauth_publickey(session, username, username_len, pubkeydata, pubkeydata_len, sign_callback, abstract), it receives a LIBSSH2_ERROR_SOCKET_RECV.
The code behind that, however, is much too enigmatic for my untrained eye to make sense of.
One obvious thing I've missed is the error message, which comes out to be "Waiting for USERAUTH response"
Potentially relevant:
https://github.com/nodegit/nodegit/issues/553
After following what little advice I could gather from above link and removing a few keys from authorized_keys, the error remains the same but the message changed to "Callback returned error". Not sure if improvement or worse.
Checking server-side logs, I find the following:
Oct 20 06:53:51 testbed1 sshd[25837]: error: Could not load host key: /etc/ssh/keyname
Oct 20 06:53:52 testbed1 sshd[25837]: Connection closed by XX.XX.XX.XX [preauth]
Oct 20 06:54:48 testbed1 sshd[25839]: error: Could not load host key: /etc/ssh/keyname
Oct 20 06:54:51 testbed1 sshd[25839]: Accepted publickey for username from...
The first two lines are on a failed attempted from libssh2.
The next two lines are on a successful attempt from scp on commandline.
I'm still not absolutely sure what is the cause.
I can only speculate that I had fallen into the bug described here:
cURL sftp public key authentication fails "Callback Error"
The code ran fine on a key without passphrase.
I still have a hard time saying this is the exact solution, as when I had just started using libssh2, it ran fine with keys with passphrase.
Still, it "works" now.
Seeing following errors in the server db log.
db_server.exe(): Error: db_VISTA error -920 (errno == "Bad file descriptor")
db_server.exe(): Error: Cannot open database in ".vbs\db"
Any idea, seeing this error for every 20 mins. This is happening for only two vobs.
Followed below with no luck.
http://www-01.ibm.com/support/docview.wss?uid=swg21236027
http://www-01.ibm.com/support/docview.wss?rs=984&uid=swg21148639
http://www-01.ibm.com/support/docview.wss?uid=swg21133944
The About db_VISTA errors page mentions:
db_VISTA database error -920 - no lock manager is installed
db_VISTA error 2 from OpenFileMapping() of lockmgr_almd
And reference the technote "DB_Vista -920 error and Error 2 from OpenFileMapping()"
Even if this isn't exactly the same error message, check the status of your lock manager (lockmgr.exe on Windows, lockmgr on Unix), both on the client and the server.
Regarding the db_server process, you can try a stop/restart ClearCase on the server, to reset both db_server and vob_server processes.
That can be also related to almd parameters, initially found in:
/opt/rational/clearcase/config/vob/db/vob_almd_params
(for all vobs), but also found in each vobs:
/path/to/vobstorage/yourVob.vbs/db/vob_almd_params
I usually try to raise those parameters in case of 920 errors.
For instance:
-u 4000 -q 16000
That (meaning those local vob configs) would explain why you see errors in only two of your vobs.
To stop the services on Windows: "How do I determine via Windows command line whether ALBD service is running?".
I am using HP-UX aCC compiler [HP C/aC++ B3910B A.06.26] to compile an old C/Pro*C application (already compiled with an older version of aCC compiler).
The compilation is always failing with the below error
Pro*C/C++: Release 10.2.0.4.0 - Production on Sun Apr 28 12:01:34 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
System default option values taken from: /data/oracle/product/10.2.0/db_1//precomp/admin/pcscfg.cfg
PCC-I-02106, Userid only used when SQLCHECK = FULL, userid ignored.
Semantic error at line 252, column 9, file ToolDb.pcpp:
EXECUTE
........1
PCC-S-02345, SQLCHECK=SEMANTICS must be given when embedded PL/SQL blocks are us
ed
gmake: *** [ToolDb.c] Error 1
As I understood, the compiler cannot recognize the proc *C keyword "EXECUTE" used to call a database stored procedure!
Any idea please that can help tp solve this issue?
Thank you very much in advance.
Regards
Add SQLCHECK=SEMANTICS to your Proc execute command
It is not something like Pro*C compiler is not identifying the EXECUTE command. Whenever there is error in PL/SQL block first word is displayed.
There might be some issue inside the PL/SQL.
It would be helpful if we can have the PL/SQL block.