Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/postgres_extension.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#define DUCKDB_BUILD_LOADABLE_EXTENSION
#include "duckdb.hpp"
#include <openssl/crypto.h>
#include <openssl/ssl.h>

#include "postgres_scanner.hpp"
#include "postgres_storage.hpp"
Expand Down Expand Up @@ -116,6 +118,12 @@ static std::string CreatePoolNote(const std::string &option) {
}

static void LoadInternal(ExtensionLoader &loader) {
// Prevent a race with OpenSSL init that manifests itself with
// the following message on the first connection attempt:
// "port 5432 failed: could not create SSL context: unknown option"
OPENSSL_init_crypto(0, nullptr);
OPENSSL_init_ssl(0, nullptr);

// Register the OAuth bearer token hook before any connections are made
PostgresInitOAuthHook();

Expand Down
Loading