Skip to content

[ruby] Update pg: 1.2.2 → 1.4.1 (minor)#319

Closed
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/pg-1.4.1
Closed

[ruby] Update pg: 1.2.2 → 1.4.1 (minor)#319
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/pg-1.4.1

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Jun 25, 2022

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ pg (1.2.2 → 1.4.1) · Repo · Changelog

Release Notes

1.4.1 (from changelog)

Bugfixes:

  • Fix another ruby-2.7 keyword warning. #465

  • Allow PG::Error to be created without arguments. #466

1.4.0 (from changelog)

Added:

  • Add PG::Connection#hostaddr, present since PostgreSQL-12. #453

  • Add PG::Connection.conninfo_parse to wrap PQconninfoParse. #453

Bugfixes:

  • Try IPv6 and IPv4 addresses, if DNS resolves to both. #452

  • Re-add block-call semantics to PG::Connection.new accidently removed in pg-1.3.0. #454

  • Handle client error after all data consumed in #copy_data for output. #455

  • Avoid spurious keyword argument warning on Ruby 2.7. #456

  • Change connection setup to respect connect_timeout parameter. #459

  • Fix indefinite hang in case of connection error on Windows #458

  • Set connection attribute of PG::Error in various places where it was missing. #461

  • Fix transaction leak on early break/return. #463

  • Update Windows fat binary gem to OpenSSL-1.1.1o and PostgreSQL-14.4.

Enhancements:

  • Don't flush at each put_copy_data call, but flush at get_result. #462

1.3.5 (from changelog)

Bugfixes:

  • Handle PGRES_COMMAND_OK in pgresult_stream_any. #447 Fixes usage when trying to stream the result of a procedure call that returns no results.

Enhancements:

  • Rename BasicTypeRegistry#define_default_types to #register_default_types to use a more consistent terminology. Keeping define_default_types for compatibility.

  • BasicTypeRegistry: return self instead of objects by accident. This allows call chaining.

  • Add some April fun. #449

Documentation:

  • Refine documentation of conn.socket_io and conn.connect_poll

1.3.4 (from changelog)

Bugfixes:

  • Don't leak IO in case of connection errors. #439 Previously it was kept open until the PG::Connection was garbage collected.

  • Fix a performance regession in conn.get_result noticed in single row mode. #442

  • Fix occasional error Errno::EBADF (Bad file descriptor) while connecting. #444

  • Fix compatibility of res.stream_each* methods with Fiber.scheduler. #446

  • Remove FL_TEST and FL_SET, which are MRI-internal. #437

Enhancements:

  • Allow pgresult_stream_any to be used by sequel_pg. #443

1.3.3 (from changelog)

Bugfixes:

  • Fix omission of the third digit of IPv4 addresses in connection URI. #435

  • Fix wrong permission of certs/larskanis-2022.pem in the pg-1.3.2.gem. #432

1.3.2 (from changelog)

Bugfixes:

  • Cancel only active query after failing transaction. #430 This avoids an incompatibility with pgbouncer since pg-1.3.0.

  • Fix String objects with non-applied encoding when using COPY or record decoders. #427

  • Update Windows fat binary gem to PostgreSQL-14.2.

Enhancements:

  • Improve extconf.rb checks to reduces the number of compiler calls.

  • Add a check for PGRES_PIPELINE_SYNC, to make sure the library version and the header files are PostgreSQL-14+. #429

1.3.1 (from changelog)

Bugfixes:

  • Fix wrong handling of socket writability on Windows introduced in #417. This caused starvation in conn.put_copy_data.

  • Fix error in PG.version_string(true). #419

  • Fix a regression in pg 1.3.0 where Ruby 2.x busy-looping any fractional seconds for every wait. #420

Enhancements:

  • Raise an error when conn.copy_data is used in nonblocking mode.

1.3.0 (from changelog)

Install Enhancements:

  • Print some install help if libpq wasn't found. #396 This should help to pick the necessary package without googling.

  • Update Windows fat binary gem to OpenSSL-1.1.1m and PostgreSQL-14.1.

  • Add binary Windows gems for Ruby 3.0 and 3.1.

  • Make the library path of libpq available in ruby as PG::POSTGRESQL_LIB_PATH and add it to the search paths on Windows similar to rpath on Unix systems. #373

  • Fall back to pkg-config if pg_config is not found. #380

  • Add option to extconf.rb to disable nogvl-wrapping of libpq functions. All methods (except PG::Connection.ping) are nonblocking now, so that GVL unlock is in theory no longer necessary. However it can have some advantage in concurrency, so that GVL unlock is still enabled by default. Use:

    • gem inst pg – –disable-gvl-unlock

API Enhancements:

  • Add full compatibility to Fiber.scheduler introduced in Ruby-3.0. #397

    • Add async_connect and async_send methods and add specific specs for Fiber.scheduler #342

    • Add async_get_result and async_get_last_result

    • Add async_get_copy_data

    • Implement async_put_copy_data/async_put_copy_end

    • Implement async_reset method using the nonblocking libpq API

    • Add async_set_client_encoding which is compatible to scheduler

    • Add async_cancel as a nonblocking version of conn#cancel

    • Add async_encrypt_password

    • Run Connection.ping in a second thread.

    • Make discard_results scheduler friendly

    • Do all socket waiting through the conn.socket_io object.

    • Avoid PG.connect blocking while address resolution by automatically providing the hostaddr parameter.

    • On Windows Fiber.scheduler support requires Ruby-3.1+. It is also only partly usable since may ruby IO methods are not yet scheduler aware on Windows.

  • Add support for pipeline mode of PostgreSQL-14. #401

  • Allow specification of multiple hosts in PostgreSQL URI. #387

  • Add new method conn.backend_key - used to implement our own cancel method.

Type cast enhancements:

  • Add PG::BasicTypeMapForQueries::BinaryData for encoding of bytea columns. #348

  • Reduce time to build coder maps and permit to reuse them for several type maps per PG::BasicTypeRegistry::CoderMapsBundle.new(conn) . #376

  • Make BasicTypeRegistry a class and use a global default instance of it. Now a local type registry can be instanciated and given to the type map, to avoid changing shared global states.

  • Allow PG::BasicTypeMapForQueries to take a Proc as callback for undefined types.

Other Enhancements:

  • Convert all PG classes implemented in C to TypedData objects. #349

  • Support ObjectSpace.memsize_of(obj) on all classes implemented in C. #393

  • Make all PG objects implemented in C memory moveable and therefore GC.compact friendly. #349

  • Update errorcodes and error classes to PostgreSQL-14.0.

  • Add PG::CONNECTION_* constants for conn.status of newer PostgreSQL versions.

  • Add better support for logical replication. #339

  • Change conn.socket_io to read+write mode and to a BasicSocket object instead of IO.

  • Use rb_io_wait() and the conn.socket_io object if available for better compatibility to Fiber.scheduler . Fall back to rb_wait_for_single_fd() on ruby < 3.0.

  • On Windows use a specialized wait function as a workaround for very poor performance of rb_io_wait(). #416

Bugfixes:

  • Release GVL while calling PQping which is a blocking method, but it didn't release GVL so far.

  • Fix Connection#transaction to no longer block on interrupts, for instance when pressing Ctrl-C and cancel a running query. #390

  • Avoid casting of OIDs to fix compat with Redshift database. #369

  • Call conn.block before each conn.get_result call to avoid possible blocking in case of a slow network and multiple query results.

  • Sporadic Errno::ENOTSOCK when using conn.socket_io on Windows #398

Deprecated:

  • Add deprecation warning to PG::BasicTypeRegistry.register_type and siblings.

Removed:

  • Remove support of ruby-2.2, 2.3 and 2.4. Minimum is ruby-2.5 now.

  • Remove support for PostgreSQL-9.2. Minimum is PostgreSQL-9.3 now.

Repository:

  • Replace Hoe by Bundler for gem packaging

  • Add Github Actions CI and testing of source and binary gems.

1.2.3 (from changelog)

Bugfixes:

  • Fix possible segfault at `PG::Coder#encode`, `decode` or their implicit calls through a typemap after GC.compact. #327

  • Fix possible segfault in `PG::TypeMapByClass` after GC.compact. #328

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu
Copy link
Contributor Author

depfu bot commented Jul 28, 2022

Closed in favor of #326.

@depfu depfu bot closed this Jul 28, 2022
@depfu depfu bot deleted the depfu/update/pg-1.4.1 branch July 28, 2022 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants