-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use jsonb when using postgresql #671
base: 3.8.x
Are you sure you want to change the base?
Conversation
Hello 👋 here is the most recent benchmark result:
This comment gets update everytime a new commit comes in! |
… when using jsonb.
@@ -56,6 +56,10 @@ private static function transformThrowable(Throwable $error): array | |||
*/ | |||
private static function transformTrace(array $trace): array | |||
{ | |||
if (array_key_exists('class', $trace) && is_string($trace['class'])) { | |||
$trace['class'] = str_replace("\x00", '', $trace['class']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any better suggestions @DavidBadura ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be its own PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, this is not doing any harm. When we adjust the table type to jsonb Postgres checks if the json is valid and doesn't like null bytes in there.
I don't think that this must be in a separate bugfix PR but I could extract it. The only thing is if the user already has null bytes in the table. Then he would need to remove them. Or do you have a case in mind?
New version for dbal was made which makes this change easier for our users. Still need to evaluate if this is worth it due to slower write speed compared to the only limited gain for querying the eventstore. |
We should use
jsonb
when the user is using postgresql. This give the user better query capabilities on the json fields in the store.When this PR is released doctrine/dbal#6693 the migration tooling should pick this change up. So the user does not need to update the table themselfes besides of the normal call to
bin/console do:mi:di
&bin/console do:mi:mi
.