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

[ruby] Update pg 1.3.5 → 1.5.6 (minor) #779

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

depfu[bot]
Copy link

@depfu depfu bot commented Mar 2, 2024

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.3.5 → 1.5.6) · Repo · Changelog

Release Notes

1.5.5 (from changelog)

  • Explicitly retype timespec fields to int64_t to fix compatibility with 32bit arches. #547
  • Fix possible buffer overflows in PG::BinaryDecoder::CopyRow on 32 bit systems. #548
  • Add binary Windows gems for Ruby 3.3.
  • Update Windows fat binary gem to OpenSSL-3.2.1 and PostgreSQL-16.2.

1.5.4 (from changelog)

  • Fix compiling the pg extension with MSVC 2022. #535
  • Set PG::Connection's encoding even if setting client_encoding on connection startup fails. #541
  • Don't set the server's client_encoding if it's unnecessary. #542 This is important for connection proxies, who disallow configuration settings.
  • Update Windows fat binary gem to OpenSSL-3.1.2 and PostgreSQL-15.4.

1.5.3 (from changelog)

  • Fix possible segfault when creating a new PG::Result with type map. #530
  • Add category to deprecation warnings of Coder.new, so that they are suppressed for most users. #528

1.5.2 (from changelog)

  • Fix regression in copy_data regarding binary format when using no coder. #527

1.5.1 (from changelog)

1.5.0 (from changelog)

Enhancements:

  • Better support for binary format:
    • Extend PG::Connection#copy_data to better support binary transfers #511
    • Add binary COPY encoder and decoder:
      • PG::BinaryEncoder::CopyRow
      • PG::BinaryDecoder::CopyRow
    • Add binary timestamp encoders:
      • PG::BinaryEncoder::TimestampUtc
      • PG::BinaryEncoder::TimestampLocal
      • PG::BinaryEncoder::Timestamp
    • Add PG::BinaryEncoder::Float4 and Float8
    • Add binary date type: #515
      • PG::BinaryEncoder::Date
      • PG::BinaryDecoder::Date
    • Add PG::Result#binary_tuples #511 It is useful for COPY and not deprecated in that context.
    • Add PG::TextEncoder::Bytea to BasicTypeRegistry #506
  • Ractor support: #519
    • Pg is now fully compatible with Ractor introduced in Ruby-3.0 and doesn't use any global mutable state.
    • All type en/decoders and type maps are shareable between ractors if they are made frozen by Ractor.make_shareable.
    • Also frozen PG::Result and PG::Tuple objects can be shared.
    • All frozen objects (except PG::Connection) can still be used to do communication with the PostgreSQL server or to read retrieved data.
    • PG::Connection is not shareable and must be created within each Ractor to establish a dedicated connection.
  • Use keyword arguments instead of hashes for Coder initialization and #to_h. #511
  • Add PG::Result.res_status as a class method and extend Result#res_status to return the status of self. #508
  • Reduce the number of files loaded at require 'pg' by using autoload. #513 Previously stdlib libraries date, json, ipaddr and bigdecimal were static dependencies, but now only socket is mandatory.
  • Improve garbage collector performance by adding write barriers to all PG classes. #518 Now they can be promoted to the old generation, which means they only get marked on major GC.
  • New method PG::Connection#check_socket to check the socket state. #521
  • Mark many internal constants as private. #522
  • Update Windows fat binary gem to OpenSSL-3.1.0.

Bugfixes:

  • Move nfields-check of stream-methods after result status check #507 This ensures that the nfield-check doesn't hide errors like statement timeout.

Removed:

  • Remove deprecated PG::BasicTypeRegistry.register_type and co. Part of #519
  • Add deprecation warning about PG::Coder initialization per Hash argument. #514 It is recommended to use keyword arguments instead.
  • The internal encoding cache was removed. #516 It shouldn't have a practical performance impact.

Repository:

  • rake test tries to find PostgreSQL server commands by pg_config #503 So there's no need to set the PATH manuelly any longer.

1.4.5 (from changelog)

  • Return the libpq default port when blank in conninfo. #492

  • Add PG::DEF_PGPORT constant and use it in specs. #492

  • Fix name resolution when empty or `nil` port is given.

  • Update error codes to PostgreSQL-15.

  • Update Windows fat binary gem to PostgreSQL-15.1 AND OpenSSL-1.1.1s.

1.4.4 (from changelog)

  • Revert to let libpq do the host iteration while connecting. #485 Ensure that parameter `connect_timeout` is still respected.

  • Handle multiple hosts in the connection string, where only one host has writable session. #476

  • Add some useful information to PG::Connection#inspect. #487

  • Support new pgresult_stream_any API in sequel_pg-1.17.0. #481

  • Update Windows fat binary gem to PostgreSQL-14.5.

1.4.3 (from changelog)

  • Avoid memory bloat possible in put_copy_data in pg-1.4.0 to 1.4.2. #473

  • Use Encoding::BINARY for JOHAB, removing some useless code. #472

1.4.2 (from changelog)

Bugfixes:

  • Properly handle empty host parameter when connecting. #471

  • Update Windows fat binary gem to OpenSSL-1.1.1q.

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

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 cancel merge
Cancels automatic merging of this PR
@​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 depfu bot added the depfu label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
0 participants