On Mon, Nov 22, 2021 at 10:27 AM Billy Zheng <[email protected]> wrote:
> Hi, Jeremy, after do some research, i can reproduce same (expected)
> behavior as ruby-pg gem.
>
> I add one code like this, i guess it means always create a new thread to
> run following SQL statement.
>
> sequel-5.50.0/lib/sequel/connection_pool/threaded.rb:139
>
> def acquire(thread)
> + return make_new(:default)
>
> Now, when run "DB.run(Sequel.lit("update investing_latest_news set
> title=title"))", it works now.
>
That may help identify the problem, but that isn't a solution. That looks
like it will leak connections.
Looks like the actual cause of the problem may be due to some connection
state that Sequel uses. By default, Sequel issues the following
initialization SQL queries on each PostgreSQL connection:
SET standard_conforming_strings = ON
SET client_min_messages = 'WARNING'
SET DateStyle = 'ISO'
I cannot see why the first two would cause a problem, but maybe the last
one does? You can turn that off via the :use_iso_date_format=>false option
when
setting up your Database connection.
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/CADGZSSc8QOKXZ4q66yTUgQNSb%3Dx75Mk%3DmA5-4%3D4pq%3Dg5S4pBmA%40mail.gmail.com.