Replies: 2 comments 1 reply
-
@driesvints I actually do think this is a bug. The purpose of that function is to determine whether the database is a type that allows The problem with this approach is that many database are using the pgsql driver to operate - but it doesn't mean that it is a PostgreSQL database, and further doesn't mean it supports My use case example is CockroachDB, which uses the pgsql driver, but doesn't support |
Beta Was this translation helpful? Give feedback.
-
I know Laravel doesnt support CockroachDB - but using it with Laravel is pretty easy and mostly without incident. The issue is when PDO::ATTR_DRIVER_NAME = 'pgsql' that does not mean PostgreSQL databases - which is my point. Many databases use the "postgres wire protocol", eg: CockroachDB, CrateDB, RavonDB and I know there are more than I've discovered. If this function was changed to better determine if the database is actually PostgreSQL database, and thus provide the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I'm using CockroachDB with Laravel - which uses the PostgreSQL PDO driver. However, according to cockroachdb/cockroach#40476 it does not support
SKIP LOCKED
(yet anyway).I've been enhancing nbj/cockroachdb-laravel (my fork is leenooks/cockroachdb-laravel), and what I cannot figure out is an easy way to ensure that
DatabaseQueue::getLockForPopping()
passess through the DB checks and returns true. Unfortunately that routine is usingPDO::ATTR_DRIVER_NAME
to determine what the DB is, but in this case it's not actually PostgreSQL.Ideally, this routine should use something else PDO/Driver/... to determine the driver for the database and make its decision to include
SKIP LOCKED
based on the PHP driver, not the PDO driver.Without this being changed, it doesnt seem that I can run job queues with CockroachDB.
Beta Was this translation helpful? Give feedback.
All reactions