Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship EdgeDB 5 with PostgreSQL 16 #76

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion edgedbpkg/edgedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class EdgeDB(packages.BundledPythonPackage):
"pgext-pgvector",
],
">=5.0.dev1": [
"postgresql-edgedb (~= 15.0)",
"postgresql-edgedb (~= 16.0)",
"python-edgedb (~= 3.12.0)",
"pgext-pgvector (~= 0.6.0)",
],
Expand All @@ -85,6 +85,7 @@ class EdgeDB(packages.BundledPythonPackage):
bundle_deps = [
postgresql.PostgreSQL(version="14.11"),
postgresql.PostgreSQL(version="15.6"),
postgresql.PostgreSQL(version="16.2"),
python_bundle.Python(version="3.10.11"),
python_bundle.Python(version="3.11.8"),
python_bundle.Python(version="3.12.2"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
From f32032bbb2bc2726a0061dd898afd327a9e1bea4 Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@edgedb.com>
Date: Tue, 16 Aug 2022 22:00:31 -0700
Subject: [PATCH 3/5] Add an envvar escape hatch to disable argv clobbering

The `set_ps_display` business clobbers the environment block on Linux,
thus butchering all prior `getenv` calls, which includes
`getenv(LD_LIBRARY_PATH)` done by `ld-musl.so`. Musl is at fault too,
because it really ought to `strdup` the entry, but until that's fixed,
setting `PG_DISABLE_PS_DISPLAY=1` is the fix.
---
src/backend/utils/misc/ps_status.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 104c01d966..a471a95792 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -14,6 +14,7 @@

#include "postgres.h"

+#include <stdlib.h>
#include <unistd.h>
#if defined(__darwin__)
#include <crt_externs.h>
@@ -29,6 +30,7 @@ extern char **environ;

/* GUC variable */
bool update_process_title = DEFAULT_UPDATE_PROCESS_TITLE;
+bool disable_ps_display = false;

/*
* Alternative ways of updating ps display:
@@ -117,9 +119,16 @@ static char **save_argv;
char **
save_ps_display_args(int argc, char **argv)
{
+ char *disable_env = getenv("PG_DISABLE_PS_DISPLAY");
+
save_argc = argc;
save_argv = argv;

+ disable_ps_display = disable_env != NULL && *disable_env != '\0';
+
+ if (disable_ps_display)
+ return argv;
+
#if defined(PS_USE_CLOBBER_ARGV)

/*
@@ -241,6 +250,9 @@ save_ps_display_args(int argc, char **argv)
void
init_ps_display(const char *fixed_part)
{
+ if (disable_ps_display)
+ return;
+
#ifndef PS_USE_NONE
bool save_update_process_title;
#endif
@@ -317,6 +329,9 @@ init_ps_display(const char *fixed_part)
static bool
update_ps_display_precheck(void)
{
+ if (disable_ps_display)
+ return;
+
/* update_process_title=off disables updates */
if (!update_process_title)
return false;
@@ -504,6 +519,12 @@ flush_ps_display(void)
const char *
get_ps_display(int *displen)
{
+ if (disable_ps_display)
+ {
+ *displen = 0;
+ return "";
+ }
+
#ifdef PS_USE_CLOBBER_ARGV
/* If ps_buffer is a pointer, it might still be null */
if (!ps_buffer)
--
2.43.0

Loading
Loading