AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   PostgreSQL Database Interface (https://forums.alliedmods.net/showthread.php?t=236415)

Peace-Maker 03-04-2014 14:26

PostgreSQL Database Interface
 
3 Attachment(s)
This driver is now included in SourceMod starting with version 1.11.0.6666.

This extension provides PostgreSQL database support to SourceMod. There is a bug report open for this, but i don't use pgsql so i can't test it in a production environment. Putting it up here to see if someone got a use for it and confirms it does what you expect.

The extension is currently compiled against postgresql 9.3.2.
It registers a "pgsql" database driver. To use this, just set the "driver" key in the databases.cfg section to "pgsql" like this:

Code:

    "pgtest"
    {
        "driver" "pgsql"
        "host" "localhost"
        "database" "my_database"
        "user" "user"
        "pass" "password"
    }

Installation
1. Drag & Drop

Due to syntax differences in the SQL flavours between MySQL, sqlite and PostgreSQL you can't be sure that all plugins will run out of the box with pgsql. You might need to slightly alter your queries depending on the used database driver. Just like you already have to do with different sql syntax between mysql and sqlite!

Latest builds against SM 1.10 and PostgreSQL 9.6.9 HERE.

This extension is compiled against SourceMod 1.6 and won't run on SM 1.5. This is due to some refactoring of the DBI system in 1.6 and me being too lazy to backport the extension to 1.5!

hamza47sohail 03-08-2014 15:21

Re: PostgreSQL Database Interface
 
Sorry if this is a newb question but what is the big difference between MySql and PostgreSQL
Also do they use the same sql queries, format etc?

Oshizu 03-08-2014 16:24

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by hamza47sohail (Post 2109286)
Sorry if this is a newb question but what is the big difference between MySql and PostgreSQL
Also do they use the same sql queries, format etc?

Using google is not hard :grrr:
http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL
https://www.scriptrock.com/articles/postgres-vs-mysql/
https://www.udemy.com/blog/mysql-vs-postgresql/

Drixevel 03-08-2014 17:44

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by hamza47sohail (Post 2109286)
Sorry if this is a newb question but what is the big difference between MySql and PostgreSQL
Also do they use the same sql queries, format etc?

Aside from the links posted by Oshizu, just stick with MySQL if you don't already know what PostgreSQL is or how it works.

SysQo 01-10-2016 06:50

Re: PostgreSQL Database Interface
 
Can i recompile with 9.4 driver easily?

printf 10-19-2016 11:24

Re: PostgreSQL Database Interface
 
(This is a repost from a PM I sent, in case anyone else has this issue)

Hello Peace-Maker,

I was wondering about the current state of the PostgreSQL driver for sourcemod. When I do threaded queries against it, the server crashes and gives me this error.

Quote:

Assertion Owner() != GetCurrentThreadId() failed.
The driver appears similar in structure to the MySQL driver, so I assumed that threading was implemented.

Thank you for your time,
printf

P.S. I forgot to mention that I also rebased it on 1.7-dev. The patches applied okay, and I didn't think there would be problems. (Since there's not much recent commit history to the MySQL driver)

EDIT2: It also happens when I rebase to 1.6-dev.

Peace-Maker 10-24-2016 05:11

Re: PostgreSQL Database Interface
 
2 Attachment(s)
This is compiled against PostgreSQL 9.6.0. Give it a try and see if it still crashes! It's compiled against SM master so requires SM 1.8+.
https://github.com/alliedmodders/sourcemod/pull/32

printf 10-27-2016 21:12

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2464496)
This is compiled against PostgreSQL 9.6.0. Give it a try and see if it still crashes! It's compiled against SM master so requires SM 1.8+.
https://github.com/alliedmodders/sourcemod/pull/32

It still crashes for some reason, I have the backtrace if you need it:
Code:

(gdb) bt
#0  0xf774aae9 in __kernel_vsyscall ()
#1  0xf7470687 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xf7473ab3 in __GI_abort () at abort.c:89
#3  0xf74697c7 in __assert_fail_base (fmt=0xf75a6df4 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
  assertion=assertion@entry=0xea3dc23c "Owner() != GetCurrentThreadId()",
  file=file@entry=0xea3dc1f8 "/home/jannik/dev/sourcemod-peace/public/amtl/amtl/am-thread-utils.h",
  line=line@entry=140, function=function@entry=0xea3dc2f7 <ke::Lockable::Lock()::__PRETTY_FUNCTION__> "void ke::Lockable::Lock()") at assert.c:92
#4  0xf7469877 in __GI___assert_fail (assertion=0xea3dc23c "Owner() != GetCurrentThreadId()",
  file=0xea3dc1f8 "/home/jannik/dev/sourcemod-peace/public/amtl/amtl/am-thread-utils.h",
  line=140, function=0xea3dc2f7 <ke::Lockable::Lock()::__PRETTY_FUNCTION__> "void ke::Lockable::Lock()") at assert.c:101
#5  0xea3c2d07 in ke::Lockable::Lock (this=0xea634390) at /home/jannik/dev/sourcemod-peace/public/amtl/amtl/am-thread-utils.h:140
#6  0xea3c2c02 in PgDatabase::LockForFullAtomicOperation (this=0x9459050) at /home/jannik/dev/sourcemod-peace/extensions/pgsql/pgsql/PgDatabase.cpp:323
#7  0xea3c27e8 in PgDatabase::SetLastIDAndRows (this=0x9459050, insertID=0, affectedRows=0) at /home/jannik/dev/sourcemod-peace/extensions/pgsql/pgsql/PgDatabase.cpp:168
#8  0xea3c22c4 in PgQuery::PgQuery (this=0xea633708, db=0x9459050, res=0xea633668) at /home/jannik/dev/sourcemod-peace/extensions/pgsql/pgsql/PgBasicResults.cpp:305
#9  0xea3c29a9 in PgDatabase::DoQuery (this=0x9459050, query=0x97a7918 "SELECT SteamID, ccname, ccmsgcol, ccuse FROM players WHERE ccuse != 0") at /home/jannik/dev/sourcemod-peace/extensions/pgsql/pgsql/PgDatabase.cpp:252
#10 0xedb5e0e2 in TQueryOp::RunThreadPart() () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#11 0xedb84520 in g_DBMan () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#12 0xedb84578 in g_DBMan () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#13 0xedb844e4 in g_DbgReporter () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#14 0xedb84578 in g_DBMan () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#15 0xedb844e4 in g_DbgReporter () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#16 0xedb84520 in g_DBMan () from /servers/hlds/SteamApps/common/Counter-Strike Source Dedicated Server/cstrike/addons/sourcemod/bin/sourcemod.logic.so
#17 0x097a77f0 in ?? ()


Peace-Maker 11-01-2016 01:32

Re: PostgreSQL Database Interface
 
I can't frequently fail to upload files to the forum. Try this one.

printf 11-02-2016 02:21

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2466772)
I can't frequently fail to upload files to the forum. Try this one.

Thank you, that appears to have fixed the issues with threaded queries.

I've converted all of my queries to work in PostgreSQL, but I still get odd things like this in parsing:

Code:

row number 135 is out of range 0..134
...
row number 4 is out of range 0..3
...
row number 4292 is out of range 0..4291

Is there another bug, or is this because MySQL indexes starting from 1 and PostgreSQL indexes starting from 0?

Peace-Maker 11-02-2016 23:03

Re: PostgreSQL Database Interface
 
Looks like another bug. I've updated the package for that. Patches getting added to the PR.
Keep the reports coming :)

SovRedBit 06-11-2017 15:48

Re: PostgreSQL Database Interface
 
Can you please add port to database.cfg, because i want to use my custom port not 5432

asherkin 06-11-2017 16:15

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by SovRedBit (Post 2527929)
Can you please add port to database.cfg, because i want to use my custom port not 5432

Did you try it? It is already supported.

SovRedBit 06-11-2017 16:24

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by asherkin (Post 2527938)
Did you try it? It is already supported.

Yep, it tell me about this error, but i changed my port in database.cfg and on database server.
Anyway i made a default port 5432 and it still give me this error, don't know what to do, i have PostgreSQL-9.4 on server and PostgreSQL-9.2 on client and i configured it to connect to the server but the extension still give me this error, don't know why.


L 06/11/2017 - 23:03:21: [SM] Exception reported: OnDBConnect could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

asherkin 06-11-2017 18:16

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by SovRedBit (Post 2527940)
Yep, it tell me about this error, but i changed my port in database.cfg and on database server.
Anyway i made a default port 5432 and it still give me this error, don't know what to do, i have PostgreSQL-9.4 on server and PostgreSQL-9.2 on client and i configured it to connect to the server but the extension still give me this error, don't know why.


L 06/11/2017 - 23:03:21: [SM] Exception reported: OnDBConnect could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

It is trying to connect using a unix domain socket so the port is completely ignored anyway...

That error message is straight from the Postgres client library, if you search for "Is the server running locally and accepting connections on Unix domain socket" you'll see many people discussing it and hopefully be able to solve it.

SovRedBit 06-12-2017 15:50

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by asherkin (Post 2527956)
It is trying to connect using a unix domain socket so the port is completely ignored anyway...

That error message is straight from the Postgres client library, if you search for "Is the server running locally and accepting connections on Unix domain socket" you'll see many people discussing it and hopefully be able to solve it.

I know what this Error mean, i tried to use psql client from this Linux server to connect to the main psql server but i had this error, so i fixed it by enable the if of this client, but on csgo server it's not working, and i don't know why, i have enabled everything, but it still not want to work.

Peace-Maker 06-12-2017 18:13

Re: PostgreSQL Database Interface
 
Paste your databases.cfg section which is causing trouble please (without credentials).

SovRedBit 06-12-2017 21:27

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2528207)
Paste your databases.cfg section which is causing trouble please (without credentials).

"vip"
{
"driver" "pgsql"
"host" "178.170....."
"database" "testvip"
"user" "postgres"
"pass" "password"
"port" "5432"
"timeout" "40
}

DJ Tsunami 06-13-2017 04:05

Re: PostgreSQL Database Interface
 
Your "timeout" line is missing a quote at the end.

SovRedBit 06-13-2017 06:06

Re: PostgreSQL Database Interface
 
It's not the problem, this error exists even if i delete the port and timeout

Peace-Maker 06-13-2017 06:32

Re: PostgreSQL Database Interface
 
How did you fix the error on your command line client?
It sounds like you didn't set a "host" IP and it's falling back to the local socket.
You're using the build linked in post 11 right?

SovRedBit 06-13-2017 13:27

Re: PostgreSQL Database Interface
 
I fixed it by making this:
1- I changed listen_addresses = 'localhost' in postgresql.conf to listen_addresses = '*'
2- In pg_hba.conf i have added a new line "host all all 178.170..../32 password"
Then service postgresql restart
And that fixed the problem on client side, but the extension won't work

SovRedBit 06-13-2017 13:29

Re: PostgreSQL Database Interface
 
I have pgsql server 9.4 version working on Debian 8, yes and i was using the extension in 11 post, but when i saw that it's not working i tried the first one, but still give me this error.
About host ip i set it to my webserver, but it's still work like localhost, don't know why

SovRedBit 06-13-2017 13:30

Re: PostgreSQL Database Interface
 
If you need any logs, please tell me i will give you

SovRedBit 06-16-2017 09:52

Re: PostgreSQL Database Interface
 
So no one knows how to fix this? Still the same error and i did not find any solution

SovRedBit 06-17-2017 14:14

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2528282)
How did you fix the error on your command line client?
It sounds like you didn't set a "host" IP and it's falling back to the local socket.
You're using the build linked in post 11 right?

Ok i had some fun with C++ code, and here what i found, i display the options in the exeption, just take a look at this:
L 06/17/2017 - 21:04:48: [SM] Exception reported: OnDBConnect password='MyDatabasePassHere' could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Its a bug, the buffer is zero, and he added just the pass because he is at the end, so he goes to localhost, and thats not a normal bug :D, fix it please, and me will try to find something else to make it work.

Peace-Maker 06-17-2017 22:06

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by SovRedBit (Post 2529404)
Ok i had some fun with C++ code, and here what i found, i display the options in the exeption, just take a look at this:
L 06/17/2017 - 21:04:48: [SM] Exception reported: OnDBConnect password='MyDatabasePassHere' could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Its a bug, the buffer is zero, and he added just the pass because he is at the end, so he goes to localhost, and thats not a normal bug :D, fix it please, and me will try to find something else to make it work.

Could you PM me the literal databases.cfg section please? Does your password contain any special characters? There might be some escaping problem.

SovRedBit 06-18-2017 07:00

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2529500)
Could you PM me the literal databases.cfg section please? Does your password contain any special characters? There might be some escaping problem.

Sorry i can't give you my production database password but i can tell you that it contains abcdefghijklmnopqrstuvwxyz1234567890 and nothing else and 32 pass length so i changed the snprintf 1024 to just sprintf and it worked.
snprintf sets NULL at the end and i thing on copy the buffer sets it to zero data.
I am now working with sprintf(buffer,"%s",data)

SovRedBit 06-21-2017 17:04

Re: PostgreSQL Database Interface
 
Hello again, i have another error its go after i think create tables, the error is:

sourcemod/public/amtl/amtl/am-thread-
utils.h:140: void ke::Lockable::Lock(): Assertion `Owner() != GetCurrentThreadId
()' failed.

How i can fix it?

Peace-Maker 06-22-2017 06:09

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by SovRedBit (Post 2530466)
Hello again, i have another error its go after i think create tables, the error is:

sourcemod/public/amtl/amtl/am-thread-
utils.h:140: void ke::Lockable::Lock(): Assertion `Owner() != GetCurrentThreadId
()' failed.

How i can fix it?

I fixed some of these concurrency errors already. You're still using the build from post #11 now, right?
Thank you for narrowing it down to the option buffers! snprintf (obviously) behaves differently on windows and linux.

SovRedBit 06-22-2017 12:07

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2530634)
I fixed some of these concurrency errors already. You're still using the build from post #11 now, right?
Thank you for narrowing it down to the option buffers! snprintf (obviously) behaves differently on windows and linux.

Sorry i don't know what build i am using, i just get the postgres branch from your sourcemod repositoty, and compile it from there, so its maybe the last build? From Github

Peace-Maker 06-22-2017 22:49

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by SovRedBit (Post 2530707)
Sorry i don't know what build i am using, i just get the postgres branch from your sourcemod repositoty, and compile it from there, so its maybe the last build? From Github

Oh right, you're compiling yourself. Could you run a debug build and paste the stacktrace of the assert please?

SovRedBit 06-23-2017 03:03

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by Peace-Maker (Post 2530853)
Oh right, you're compiling yourself. Could you run a debug build and paste the stacktrace of the assert please?

I can try that today, but i don't think i have relevant knowledge to use GDB with srcds_run, i tried that yasterday, but with no result. It would be better if you give me some instructions how to do that well, or just give me the link to some good article that explains how to debug extension on sourcemod.

asherkin 06-23-2017 04:04

Re: PostgreSQL Database Interface
 
Quote:

Originally Posted by SovRedBit (Post 2530879)
I can try that today, but i don't think i have relevant knowledge to use GDB with srcds_run, i tried that yasterday, but with no result. It would be better if you give me some instructions how to do that well, or just give me the link to some good article that explains how to debug extension on sourcemod.

LD_LIBRARY_PATH=.:bin gdb --args ./srcds_linux -game ??? +map ???

Then "run" at the GDB prompt when all loaded.

You must use srcds_linux instead of the srcds_run wrapper.

SovRedBit 06-24-2017 06:28

Quote:

Originally Posted by asherkin (Post 2530889)
LD_LIBRARY_PATH=.:bin gdb --args ./srcds_linux -game ??? +map ???

Then "run" at the GDB prompt when all loaded.

You must use srcds_linux instead of the srcds_run wrapper.

Code:

(gdb) bt
#0  0x4001f420 in __kernel_vsyscall ()
#1  0x400b91f7 in raise () from /lib/libc.so.6
#2  0x400baa33 in abort () from /lib/libc.so.6
#3  0x400b2297 in __assert_fail_base () from /lib/libc.so.6
#4  0x400b2347 in __assert_fail () from /lib/libc.so.6
#5  0x4b28fe2f in ke::Lockable::Lock (this=0xb29feb0) at /home/soviet-lulz/src/newdisk/sourcemod/public/amtl/amtl/am-thread-utils.h:140
#6  0x4b28fcfe in PgDatabase::LockForFullAtomicOperation (this=0x4b011830) at /home/soviet-lulz/src/newdisk/sourcemod/extensions/pgsql/pgsql/PgDatabase.cpp:347
#7  0x4b28fd5c in PgDatabase::SetCharacterSet (this=0x4b011830, characterset=0x9dd4ae0 "utf8") at /home/soviet-lulz/src/newdisk/sourcemod/extensions/pgsql/pgsql/PgDatabase.cpp:366
#8  0x4a66e4f3 in SQL_SetCharset (pContext=0x9d7dbb8, params=0x9dde78c) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:1510
#9  0x4aaf9beb in ?? ()
#10 0x4aaf9beb in ?? ()
#11 0x4aaf931a in ?? ()
#12 0x4aa9006f in ?? ()
#13 0x4aa4ab6c in sp::Environment::Invoke (this=0x993fec0, cx=0x9d7dbb8, method=..., result=0xbfffc3cc) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/environment.cpp:281
#14 0x4aa68ace in sp::PluginContext::Invoke (this=0x9d7dbb8, fnid=275, params=0xbfffc440, num_params=3, result=0xbfffc3cc) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/plugin-context.cpp:465
#15 0x4aa4fe02 in sp::ScriptedInvoker::Invoke (this=0x9f062e8, result=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:296
#16 0x4aa4f874 in sp::ScriptedInvoker::Execute (this=0x9f062e8, result=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:190
#17 0x4a66fc47 in TConnectOp::RunThinkPart (this=0x9f06b40) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:382
#18 0x4a668f78 in DBManager::RunFrame (this=0x4a6e0ee0 <g_DBMan>) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/Database.cpp:657
#19 0x4a6676c7 in FrameHook (simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/Database.cpp:58
#20 0x4a35baed in SourceModBase::ProcessGameFrameHooks (this=0x4a5ef280 <g_SourceMod>, simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/sourcemod.cpp:696
#21 0x4a354ca2 in RunFrameHooks (simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/frame_hooks.cpp:106
#22 0x4a38244f in TimerSystem::GameFrame (this=0x4a5f3b20 <g_Timers>, simulating=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/TimerSys.cpp:237
#23 0x4a35d81f in fastdelegate::FastDelegate1<bool, void>::operator() (this=0x99427dc, p1=false) at /home/soviet-lulz/src/newdisk/mmsource-1.10/core/sourcehook/FastDelegate.h:994
#24 0x4a35ca42 in __SourceHook_FHCls_IServerGameDLLGameFramefalse::CMyDelegateImpl::Call (this=0x99427d8, p1=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/sourcemod.cpp:54
#25 0x4a35cb30 in __SourceHook_FHCls_IServerGameDLLGameFramefalse::Func (this=0x4564ffb8, p1=false) at /home/soviet-lulz/src/newdisk/sourcemod/core/sourcemod.cpp:54
#26 0x40cc308e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#27 0x40cc4359 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#28 0x40d7352e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#29 0x40d741cc in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#30 0x40d74938 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#31 0x40d7db84 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#32 0x40d7de56 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#33 0x40d7df69 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#34 0x40de02da in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#35 0x40ddd226 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#36 0x407144ed in ?? () from bin/dedicated.so
#37 0x40714578 in ?? () from bin/dedicated.so
#38 0x40ddd31d in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#39 0x40f11760 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#40 0x40dde50f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#41 0x40714654 in ?? () from bin/dedicated.so
#42 0x40771890 in ?? () from bin/dedicated.so
#43 0x40772abe in ?? () from bin/dedicated.so
#44 0x40771890 in ?? () from bin/dedicated.so
#45 0x4070d8f3 in ?? () from bin/dedicated.so
#46 0x080486f9 in ?? ()
#47 0x400a49a3 in __libc_start_main () from /lib/libc.so.6
#48 0x080488bd in ?? ()

http://i.imgur.com/tUvUi8U.png
I think this place cause the error on 366

Ok, i know now that it was the error here, in plugin this code was causing driver crash
Quote:

g_hDatabase.SetCharset("utf8");
So fix the threads please

And here another error, when i enter the game and the server is loading, on load game files at csgo server, in the client i mean, it stops at that loading and nothing happen, but when i started to debug it, i found this:
Quote:

Program received signal SIGSEGV, Segmentation fault.
0x49569311 in SQL_QuoteString (pContext=0x9d472b0, params=0x9da87e8)
at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:742
742 /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp: Нет такого файла или каталога.
Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.2.i686
"Нет такого файла или каталога." Means that there no file or catalog but i found this file and catalog, so i don't know what that means, and when i remove postgresql extension it starts work well.

And here is the code of that place at 742 line:
http://i.imgur.com/GTdxsVr.png

SovRedBit 06-24-2017 16:25

Re: PostgreSQL Database Interface
 
Aaaand i had some fun finding this bug, and here what i have got, first take tha backtrace with variables:
Quote:

#0 0x49569311 in SQL_QuoteString (pContext=0x9d47310, params=0x9da8838) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:742
db = 0x49e13a00
err = SourceMod::HandleError_None
written = 32
s = false
input = 0x9da88cc "S0vR3dB1T [R.A.S]"
output = 0x9da8868 ""
maxlength = 65
addr = 0x1
#1 0x498923e5 in ?? ()
No symbol table info available.
#2 0x498923e5 in ?? ()
No symbol table info available.
#3 0x49891aff in ?? ()
No symbol table info available.
#4 0x4989186c in ?? ()
No symbol table info available.
#5 0x4982506f in ?? ()
No symbol table info available.
#6 0x490afb6c in sp::Environment::Invoke (this=0x9909208, cx=0x9d47310, method=..., result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/environment.cpp:281
ivkframe = {<sp::InvokeFrame> = {_vptr.InvokeFrame = 0x490d9af0 <vtable for sp::JitInvokeFrame+8>, prev_ = 0x0, cx_ = 0x9d47310, entry_cip_ = 0}, prev_exit_fp_ = 0xf}
invoke = 0x49825048
fn = 0xa62cbe8
__PRETTY_FUNCTION__ = "bool sp::Environment::Invoke(sp::PluginContext*, const ke::RefPtr<sp::MethodInfo>&, cell_t*)"
#7 0x490cdace in sp::PluginContext::Invoke (this=0x9d47310, fnid=269, params=0xbfffb9a0, num_params=1, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/plugin-context.cpp:465
__PRETTY_FUNCTION__ = "bool sp::PluginContext::Invoke(funcid_t, const cell_t*, unsigned int, cell_t*)"
err = 0
save_sp = 48372
cfun = 0x9e89980
ignore_result = -11
method = {thing_ = 0xab278b0}
save_hp = 15996
sp = 0x9da8afc
profileScope = {<No data fields>}
public_id = 134
scriptScope = {<No data fields>}
ok = true
#8 0x490b4e02 in sp::ScriptedInvoker::Invoke (this=0x9e89980, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:296
temp_params = {1, 8, 174188788, 1074803896, 1076121600, -1073758464, 2147483612, 1074586582, 0, 1300902114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1074266373, 1089647323, -1073759640, 1074256512, -1073759640, 1089649757, 22,
-1073759700, -1073759672, 0}
temp_info = {{flags = 0, marked = false, local_addr = 10309, phys_addr = 0x2845, orig_addr = 0x0, size = 10329, str = {is_sz = false, sz_flags = 0}}, {flags = -1, marked = false, local_addr = 16, phys_addr = 0x1,
orig_addr = 0x0, size = 4294967295, str = {is_sz = false, sz_flags = 1109394464}}, {flags = 1093108228, marked = true, local_addr = -1073755416, phys_addr = 0x40ca8805, orig_addr = 0x41278204, size = 0, str = {
is_sz = false, sz_flags = 11}}, {flags = 0, marked = 220, local_addr = 0, phys_addr = 0x23, orig_addr = 0x209208, size = 3221209208, str = {is_sz = 226, sz_flags = -1073758132}}, {flags = 37, marked = 4, local_addr = 0,
phys_addr = 0xffffffff, orig_addr = 0x0, size = 1090960717, str = {is_sz = false, sz_flags = 109}}, {flags = 1, marked = false, local_addr = 1090960791, phys_addr = 0xbfffc05c, orig_addr = 0x0, size = 1075665564, str = {
is_sz = 128, sz_flags = 1225578131}}, {flags = 173815272, marked = 3, local_addr = 31, phys_addr = 0x9eb7ff0, orig_addr = 0x0, size = 28444, str = {is_sz = 20, sz_flags = 1075657481}}, {flags = 165886936, marked = 128,
local_addr = -1073758232, phys_addr = 0x490b501a <sp::ScriptedInvoker::Invoke(int*)+1860>, orig_addr = 0x9909208, size = 6032, str = {is_sz = 128, sz_flags = 1074774990}}, {flags = -1073758128, marked = 216, local_addr = 0,
phys_addr = 0x400fcd4e <_IO_no_init+46>, orig_addr = 0xbfffbb80, size = 1076121600, str = {is_sz = 128, sz_flags = 1074775346}}, {flags = -1073759360, marked = 160, local_addr = 1074586187, phys_addr = 0x4127870a,
orig_addr = 0xbfffbca0, size = 3221207936, str = {is_sz = 7, sz_flags = 1074755203}}, {flags = -1073759360, marked = 223, local_addr = 1074583789, phys_addr = 0x401034b8 <free+8>, orig_addr = 0x40245000, size = 3221209280,
str = {is_sz = 237, sz_flags = 1074586582}}, {flags = 0, marked = 191, local_addr = 0, phys_addr = 0x0, orig_addr = 0xbfffbca0, size = 5, str = {is_sz = 159, sz_flags = 1076139264}}, {flags = -1073757025, marked = false,
local_addr = 0, phys_addr = 0x0, orig_addr = 0x0, size = 0, str = {is_sz = 237, sz_flags = 0}}, {flags = 1076121600, marked = false, local_addr = 0, phys_addr = 0x40020fb8, orig_addr = 0x41245750, size = 0, str = {
is_sz = false, sz_flags = -8}}, {flags = 0, marked = 246, local_addr = 0, phys_addr = 0x0, orig_addr = 0x0, size = 10, str = {is_sz = false, sz_flags = 0}}, {flags = 0, marked = false, local_addr = 0, phys_addr = 0x2,
orig_addr = 0xa4d4e88, size = 4294967295, str = {is_sz = 117, sz_flags = -1073758088}}, {flags = 2156356, marked = 248, local_addr = 187230020, phys_addr = 0x400cf769 <vfprintf+5417>, orig_addr = 0xb28e744,
size = 187230008, str = {is_sz = false, sz_flags = 11}}, {flags = 0, marked = 183, local_addr = 0, phys_addr = 0x12, orig_addr = 0xb28e744, size = 3612, str = {is_sz = 191, sz_flags = -1073757716}}, {flags = 187230020,
marked = 27, local_addr = 1074236224, phys_addr = 0x4dd0ee50, orig_addr = 0xb28e738, size = 3612, str = {is_sz = 64, sz_flags = 1305538128}}, {flags = 187230008, marked = false, local_addr = 0,
phys_addr = 0x400fc532 <__GI__IO_default_xsputn+18>, orig_addr = 0xb28e744, size = 187230008, str = {is_sz = 68, sz_flags = -1073757217}}, {flags = 187230008, marked = false, local_addr = 10, phys_addr = 0x4d3ebf89,
orig_addr = 0xa052f58, size = 3612, str = {is_sz = 64, sz_flags = 1074803896}}, {flags = 1076121600, marked = 16, local_addr = 2147483617, phys_addr = 0x400ce3d6 <vfprintf+406>, orig_addr = 0x0, size = 1300902114, str = {
is_sz = false, sz_flags = 1295954773}}, {flags = 187230020, marked = true, local_addr = -1073757584, phys_addr = 0x4d3ebf89, orig_addr = 0xb088138, size = 163386088, str = {is_sz = 152, sz_flags = 184181480}}, {
flags = 164259928, marked = 152, local_addr = 172813520, phys_addr = 0xa4ce8c0, orig_addr = 0xb1f3d70, size = 172811360, str = {is_sz = 24, sz_flags = 163419672}}, {flags = 163418576, marked = false, local_addr = 0,
phys_addr = 0x0, orig_addr = 0x0, size = 0, str = {is_sz = false, sz_flags = 0}}, {flags = 0, marked = false, local_addr = 0, phys_addr = 0x0, orig_addr = 0xffffffff, size = 0, str = {is_sz = false, sz_flags = 1}}, {
flags = 5, marked = 255, local_addr = 0, phys_addr = 0xfffffff5, orig_addr = 0x200e25, size = 3221209956, str = {is_sz = 4, sz_flags = 1074591593}}, {flags = 69158, marked = 16, local_addr = 721024, phys_addr = 0xbfffbd90,
orig_addr = 0xa4d4e88, size = 171445424, str = {is_sz = 152, sz_flags = 172837560}}, {flags = 164181576, marked = 24, local_addr = 173624248, phys_addr = 0xa8c2338, orig_addr = 0xa8c0850, size = 187026832, str = {
is_sz = 224, sz_flags = 172840640}}, {flags = 171441120, marked = 184, local_addr = 176956216, phys_addr = 0xb25c948, orig_addr = 0x9bdd668, size = 176949328, str = {is_sz = 248, sz_flags = 1225455220}}, {
flags = 160469520, marked = 192, local_addr = -1073758712, phys_addr = 0x49570843 <ke::LinkedList<SourcePawn::IPluginFunction *, ke::SystemAllocatorPolicy>::head()+17>, orig_addr = 0x991d324, size = 0, str = {is_sz = 24,
sz_flags = 1225598042}}, {flags = 160469512, marked = false, local_addr = -1073758696, phys_addr = 0x490ca405 <sp::SourcePawnEngine2::Environment()+11>, orig_addr = 0xbfffbe6c, size = 160551716, str = {is_sz = 56,
sz_flags = 1225478525}}}
—-Type <return> to continue, or q <return> to quit---
i = 1
ok = true
docopies = true
numparams = 1
#9 0x490b4874 in sp::ScriptedInvoker::Execute (this=0x9e89980, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:190
env = 0x9909208
eh = {_vptr.ExceptionHandler = 0x490d9360 <vtable for SourcePawn::ExceptionHandler+8>, env_ = 0x9909208, next_ = 0x0, catch_ = true}
__PRETTY_FUNCTION__ = "virtual int sp::ScriptedInvoker::Execute(cell_t*)"
#10 0x4956ebbb in CForward::Execute (this=0x991d320, result=0xbfffc24c, filter=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/ForwardSys.cpp:306
func = 0x9e89980
iter = {list_ = 0x991d324, prev_ = 0x0, impl_ = {this_ = 0x9e89e50}, mutated_ = false}
cur_result = 0
low_result = 0
err = 0
success = 1
temp_info = {{val = 1, byref = {cells = 0, orig_addr = 0x0, flags = 0, sz_flags = 0}, pushedas = SourceMod::Param_Any}, {val = 0, byref = {cells = 0, orig_addr = 0x0, flags = 0, sz_flags = 0},
pushedas = SourceMod::Param_Any} <repeats 31 times>}
__PRETTY_FUNCTION__ = "virtual int CForward::Execute(cell_t*, SourceMod::IForwardFilter*)"
high_result = 0
num_params = 1
#11 0x492761ed in PlayerManager::OnClientPutInServer (this=0x494f0900 <g_Players>, pEntity=0x447d5030, playername=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:744
pPlayer = 0x9915fe8
iter = {m_This = 0x8ba7198}
res = 146436504
client = 1
pListener = 0x49dde140 <g_CookieManager>
#12 0x4927d5a6 in fastdelegate::FastDelegate2<edict_t*, char const*, void>::operator() (this=0x990b41c, p1=0x447d5030, p2=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/mmsource-1.10/core/sourcehook/FastDelegate.h:1079
No locals.
#13 0x4927b9c6 in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::CMyDelegateImpl::Call (this=0x990b418, p1=0x447d5030, p2=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
No locals.
#14 0x4927bb9d in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::Func (this=0x4436b160, p1=0x447d5030, p2=0xa5ccaa8 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
vfnptr_origentry = 0x43606cd0
status = MRES_IGNORED
prev_res = MRES_IGNORED
cur_res = MRES_IGNORED
iter = 0x990b418
ourvfnptr = 0x43ec78fc
pContext = 0x97f5f50
#15 0x40cc590c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#16 0x40cb4192 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#17 0x40cb03a6 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#18 0x40d8b970 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#19 0x40d8bca5 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#20 0x40d8d8fb in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#21 0x40d8df3c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#22 0x40d9e93e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#23 0x40cf427f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#24 0x40cc416c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#25 0x40d7352e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#26 0x40d741cc in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#27 0x40d74938 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#28 0x40d7db84 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
—-Type <return> to continue, or q <return> to quit---
No symbol table info available.
#29 0x40d7de56 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#30 0x40d7df69 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#31 0x40de02da in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#32 0x40ddd226 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#33 0x407144ed in ?? () from bin/dedicated.so
No symbol table info available.
#34 0x40714578 in ?? () from bin/dedicated.so
No symbol table info available.
#35 0x40ddd31d in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#36 0x40f11760 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#37 0x40dde50f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
No symbol table info available.
#38 0x40714654 in ?? () from bin/dedicated.so
No symbol table info available.
#39 0x40771890 in ?? () from bin/dedicated.so
No symbol table info available.
#40 0x40772abe in ?? () from bin/dedicated.so
No symbol table info available.
#41 0x40771890 in ?? () from bin/dedicated.so
No symbol table info available.
#42 0x4070d8f3 in ?? () from bin/dedicated.so
No symbol table info available.
#43 0x080486f9 in ?? ()
No symbol table info available.
#44 0x400a49a3 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#45 0x080488bd in ?? ()
No symbol table info available.
Then take just backtrace:
Quote:

Edward, [24.06.17 22:46]
#0 0x49569311 in SQL_QuoteString (pContext=0x9d472d8, params=0x9da8800) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/smn_database.cpp:742
#1 0x498923e5 in ?? ()
#2 0x498923e5 in ?? ()
#3 0x49891aff in ?? ()
#4 0x4989186c in ?? ()
#5 0x4982506f in ?? ()
#6 0x490afb6c in sp::Environment::Invoke (this=0x9909208, cx=0x9d472d8, method=..., result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/environment.cpp:281
#7 0x490cdace in sp::PluginContext::Invoke (this=0x9d472d8, fnid=269, params=0xbfffb9a0, num_params=1, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/plugin-context.cpp:465
#8 0x490b4e02 in sp::ScriptedInvoker::Invoke (this=0x9e89948, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:296
#9 0x490b4874 in sp::ScriptedInvoker::Execute (this=0x9e89948, result=0xbfffbea0) at /home/soviet-lulz/src/newdisk/sourcemod/sourcepawn/vm/scripted-invoker.cpp:190
#10 0x4956ebbb in CForward::Execute (this=0x991d320, result=0xbfffc24c, filter=0x0) at /home/soviet-lulz/src/newdisk/sourcemod/core/logic/ForwardSys.cpp:306
#11 0x492761ed in PlayerManager::OnClientPutInServer (this=0x494f0900 <g_Players>, pEntity=0x447d5030, playername=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:744
#12 0x4927d5a6 in fastdelegate::FastDelegate2<edict_t*, char const*, void>::operator() (this=0x990b41c, p1=0x447d5030, p2=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/mmsource-1.10/core/sourcehook/FastDelegate.h:1079
#13 0x4927b9c6 in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::CMyDelegateImpl::Call (this=0x990b418, p1=0x447d5030, p2=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
#14 0x4927bb9d in __SourceHook_FHCls_IServerGameClientsClientPu tInServer0::Func (this=0x4436b160, p1=0x447d5030, p2=0xa5ccf00 "S0vR3dB1T [R.A.S]") at /home/soviet-lulz/src/newdisk/sourcemod/core/PlayerManager.cpp:70
#15 0x40cc590c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#16 0x40cb4192 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#17 0x40cb03a6 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#18 0x40d8b970 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#19 0x40d8bca5 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#20 0x40d8d8fb in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#21 0x40d8df3c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#22 0x40d9e93e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#23 0x40cf427f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#24 0x40cc416c in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#25 0x40d7352e in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#26 0x40d741cc in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#27 0x40d74938 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#28 0x40d7db84 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#29 0x40d7de56 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#30 0x40d7df69 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#31 0x40de02da in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#32 0x40ddd226 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#33 0x407144ed in ?? () from bin/dedicated.so
#34 0x40714578 in ?? () from bin/dedicated.so
#35 0x40ddd31d in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#36 0x40f11760 in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#37 0x40dde50f in ?? () from /home/servers/csgoservers/csgo-PUBLIC2/bin/engine.so
#38 0x40714654 in ?? () from bin/dedicated.so
#39 0x40771890 in ?? () from bin/dedicated.so
#40 0x40772abe in ?? () from bin/dedicated.so
#41 0x40771890 in ?? () from bin/dedicated.so
#42 0x4070d8f3 in ?? () from bin/dedicated.so
I talked with one SP developer he told me that the error might be at the
in PgDatabase.cpp
Quote:

290IQuery *PgDatabase::DoQueryEx(const char *query, size_t len)
291{
292 // There is no way to send binary data like that in queries.
293 // You'd need to escape the value with PQescapeByteaConn first and use it in the query string as usual.
294 return DoQuery(query);
295}
Code so i don't know, how to fix the problem, or how much i need to wait, to get your fix?

Peace-Maker 05-25-2018 13:09

Re: PostgreSQL Database Interface
 
2 Attachment(s)
Quote:

Originally Posted by SovRedBit (Post 2531467)
Aaaand i had some fun finding this bug, and here what i have got, first take tha backtrace with variables:


Then take just backtrace:

I talked with one SP developer he told me that the error might be at the
in PgDatabase.cpp

Code so i don't know, how to fix the problem, or how much i need to wait, to get your fix?

Could it be that you're locking the database yourself using SQL_LockDatabase before using SQL_SetCharset? SQL_SetCharset locks the database itself, so you don't need to lock it manually before calling that native.

Attached are the latest builds from the PR compiled against PostgreSQL 9.6.9.

Napas 09-11-2019 10:25

Re: PostgreSQL Database Interface
 
When specifying host, user and password in databases.cfg, it is trying to connect to unix socket in /tmp/.s.PGSQL.5432.

Peace-Maker 09-11-2019 11:27

Re: PostgreSQL Database Interface
 
Are you setting the host to "localhost"? Try "127.0.0.1" instead, so it uses the IP stack instead of local sockets. You can just set it to the correct path to the sock file too.

Napas 09-11-2019 11:37

Re: PostgreSQL Database Interface
 
Quote:

"pgtest"
{
"driver" "pgsql"
"host" "127.0.0.1"
"database" "null"
"user" "null"
"pass" "null"
"port" "5432"
}
With this config I get this error:
Quote:

[SM] Exception reported: FATAL: role "test_server" does not exist
Consider that I symlinked /tmp/.s.PGSQL.5432 to /var/run/postgresql/.s.PGSQL.5432.


All times are GMT -4. The time now is 15:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.