aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvvv <vvvv@ydb.tech>2023-09-08 02:43:22 +0300
committervvvv <vvvv@ydb.tech>2023-09-08 03:00:55 +0300
commitc80275ddb4a1c7935248eb260d3ffea47ed0f5e1 (patch)
treef49299674d338a46980ab800f67d3900a959b60e
parentbb5698d0b161677f841775e2c34056a40be70cc4 (diff)
downloadydb-c80275ddb4a1c7935248eb260d3ffea47ed0f5e1.tar.gz
don't call openssl & srandom per thread
-rw-r--r--ydb/library/yql/parser/pg_wrapper/parser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ydb/library/yql/parser/pg_wrapper/parser.cpp b/ydb/library/yql/parser/pg_wrapper/parser.cpp
index bffe099a41..a57c589ca5 100644
--- a/ydb/library/yql/parser/pg_wrapper/parser.cpp
+++ b/ydb/library/yql/parser/pg_wrapper/parser.cpp
@@ -25,6 +25,7 @@ extern "C" {
#include "utils/memutils.h"
#include "utils/memdebug.h"
#include "utils/resowner.h"
+#include "utils/timestamp.h"
#include "port/pg_bitutils.h"
#include "port/pg_crc32c.h"
#include "postmaster/postmaster.h"
@@ -239,7 +240,10 @@ extern "C" void setup_pg_thread_cleanup() {
CurTransactionResourceOwner = owner;
CurrentResourceOwner = owner;
- InitProcessGlobals();
+ MyProcPid = getpid();
+ MyStartTimestamp = GetCurrentTimestamp();
+ MyStartTime = timestamptz_to_time_t(MyStartTimestamp);
+
InitializeLatchSupport();
MyLatch = &LocalLatchData;
InitLatch(MyLatch);