pg 1.6.0.rc2-aarch64-linux → 1.6.1-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fcebfe949ab796da0a3cf05a15ef433c2610a9d376b9c33fc664aebebea47b6
4
- data.tar.gz: a6d46a5677c5f46441619058f94a894c5e1a0fea3196a7be05e665cf9d0a2c1c
3
+ metadata.gz: 8891f2124bf2f11d2eb182853e48a9c9110022191d640f79dc42fdf4966de907
4
+ data.tar.gz: 55c9c8947b57a3dfa07cc5a9f260f5ffe14827aafd89a617aabf3fced703a90f
5
5
  SHA512:
6
- metadata.gz: df4427d8336af2eebcaf9ea42c68e0060acd9fe7cb52b2530a66fac10dceb382df07d6a91423b832a7b9e4fcd013703385a175ca22c672e0ed3c2a64e5d17ba2
7
- data.tar.gz: 05d335dce94077b8d86e1153af666e50b0116f6f4c759d134b1165b010bcebf7486b37735b0d07c909c8fc64295ea6cfd1196bbf7ab41df048e87952c0f7b2a9
6
+ metadata.gz: 5ddbaeb74c8e6014d5d6a4524a518b3a4e0f4a6fb357bfec834b2d14f402c422aad90d2182b6b95f9ec3e9dccafabf6c371e8df3acfc0e91aa024f75a1e2bd79
7
+ data.tar.gz: '018ee41e169d8a25a03dcc2470829c9d271211cbff4e25fc8cf8bc5a44f1923546897b8ebf3403af8a7872b6d033ed227a36739dd76a5c41a7141112cd810bec'
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,49 +1,49 @@
1
- ## v1.6.0.rc2 [2025-07-16] Lars Kanis <lars@greiz-reinsdorf.de>
1
+ ## v1.6.1 [2025-08-03] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ - Add binary gems for platforms `aarch64-linux-musl` and `x86_64-linux-musl` without the need to install package `gcompat`. [#657](https://github.com/ged/ruby-pg/pull/657).
4
+ - Serialize CompositeCoder#dimensions only when set. [#652](https://github.com/ged/ruby-pg/pull/652)
5
+ This fixes the compatibility to pg-1.5.9, when deserializing Marshal data from pg-1.6, as long as the new attribute isn't used.
6
+ - Remove dependency to MSYS2 package "postgresql" from binary Windows gem [#654](https://github.com/ged/ruby-pg/pull/654)
7
+
8
+
9
+ ## v1.6.0 [2025-07-27] Lars Kanis <lars@greiz-reinsdorf.de>
2
10
 
3
11
  Added:
4
12
 
5
13
  - Add binary gems for Ruby 3.4.
6
- - Add fat binary gem for platform `aarch64-mingw-ucrt` aka Windows on ARM [#626](https://github.com/ged/ruby-pg/pull/626), for platform Macos on Intel and ARM [#643](https://github.com/ged/ruby-pg/pull/643) and for platform `aarch64-linux` [#646](https://github.com/ged/ruby-pg/pull/646).
14
+ - Add fat binary gem for platform `aarch64-mingw-ucrt` aka Windows on ARM [#626](https://github.com/ged/ruby-pg/pull/626), for platform Macos on Intel and ARM [#643](https://github.com/ged/ruby-pg/pull/643), for platform `aarch64-linux` [#646](https://github.com/ged/ruby-pg/pull/646) and for platform `x86_64-linux` [#551](https://github.com/ged/ruby-pg/pull/551#issuecomment-2504715762).
7
15
  - Update fat binary gem to OpenSSL-3.5.1 and PostgreSQL-17.5.
8
16
  - Add a patch to libpq to avoid starvation on bigger SSL records, which some database engines other than vanilla PostgreSQL use.
9
17
  This patch applies to platform specific binary gems only.
10
18
  [#616](https://github.com/ged/ruby-pg/pull/616)
11
- - Fix missing array input verification in PG::TypeMapByColumn.
12
- This could cause a segfault.
13
- [#620](https://github.com/ged/ruby-pg/pull/620)
19
+ - Add support for new query cancel functions of PostgreSQL-17.
20
+ This adds the new class `PG::CancelConnection` which provides the ability to cancel a query per blocking or per non-blocking functions.
21
+ If the new functions are available they are used and the older are no longer compiled in.
22
+ This way we can get rid of reading out the internal `PGcancel` struct by `Connection#backend_key`.
23
+ [#614](https://github.com/ged/ruby-pg/pull/614)
24
+ - Add PG::BinaryDecoder::Array and PG::BinaryEncoder::Array to parse and encode PostgreSQL arrays in binary format.
25
+ [#603](https://github.com/ged/ruby-pg/pull/603)
14
26
  - Add possibility to define the number of array dimensions to be encoded.
15
27
  Setting dimensions is especially useful, when a Record shall be encoded into an Array, since the Array encoder can not distinguish if the array shall be encoded as a higher dimension or as a record otherwise.
16
28
  [#622](https://github.com/ged/ruby-pg/pull/622)
29
+ - Add Connection#set_chunked_rows_mode [#610](https://github.com/ged/ruby-pg/pull/610)
30
+ - Add PG::Connection#close_prepared, PG::Connection#close_portal, PG::Connection#send_close_prepared and PG::Connection#send_close_portal which are new in PostgreSQL-17.
31
+ [#611](https://github.com/ged/ruby-pg/pull/611)
32
+ - Add Connection#send_pipeline_sync, async_pipeline_sync and release GVL at PQ(sendP|P)ipelineSync.
33
+ [#612](https://github.com/ged/ruby-pg/pull/612)
17
34
  - Add MINGW package dependency which is resolved by RubyInstaller.
18
35
  [#617](https://github.com/ged/ruby-pg/pull/617)
19
36
  - Change `conn.server_version` and `conn.protocol_version` to raise instead of return 0 on error.
20
37
  [#632](https://github.com/ged/ruby-pg/pull/632)
38
+ - Fix connecting to multiple hosts after `connnect_timeout`.
39
+ [#637](https://github.com/ged/ruby-pg/pull/637)
21
40
  - Fix making PG::BasicTypeMapForQueries shareable for Ractor in ruby-3.5.
22
41
  [#636](https://github.com/ged/ruby-pg/pull/636)
42
+ - Fix missing array input verification in PG::TypeMapByColumn.
43
+ This could cause a segfault.
44
+ [#620](https://github.com/ged/ruby-pg/pull/620)
23
45
  - Rename `History.md` to `CHANGELOG.md`, which is more common.
24
46
  [#642](https://github.com/ged/ruby-pg/pull/642)
25
- - Fix connecting to multiple hosts after `connnect_timeout`.
26
- [#637](https://github.com/ged/ruby-pg/pull/637)
27
-
28
-
29
- ## v1.6.0.rc1 [2024-11-28] Lars Kanis <lars@greiz-reinsdorf.de>
30
-
31
- Added:
32
-
33
- - Add fat binary gem for platform `x86_64-linux`.
34
- [#551](https://github.com/ged/ruby-pg/pull/551#issuecomment-2504715762)
35
- - Add PG::BinaryDecoder::Array and PG::BinaryEncoder::Array to parse and encode PostgreSQL arrays in binary format.
36
- [#603](https://github.com/ged/ruby-pg/pull/603)
37
- - Add support for new query cancel functions of PostgreSQL-17.
38
- This adds the new class `PG::CancelConnection` which provides the ability to cancel a query per blocking or per non-blocking functions.
39
- If the new functions are available they are used and the older are no longer compiled in.
40
- This way we can get rid of reading out the internal `PGcancel` struct by `Connection#backend_key`.
41
- [#614](https://github.com/ged/ruby-pg/pull/614)
42
- - Add Connection#set_chunked_rows_mode [#610](https://github.com/ged/ruby-pg/pull/610)
43
- - Add PG::Connection#close_prepared, PG::Connection#close_portal, PG::Connection#send_close_prepared and PG::Connection#send_close_portal which are new in PostgreSQL-17.
44
- [#611](https://github.com/ged/ruby-pg/pull/611)
45
- - Add Connection#send_pipeline_sync, async_pipeline_sync and release GVL at PQ(sendP|P)ipelineSync.
46
- [#612](https://github.com/ged/ruby-pg/pull/612)
47
47
 
48
48
  Removed:
49
49
 
data/README.md CHANGED
@@ -40,29 +40,34 @@ A small example usage:
40
40
  ## Requirements
41
41
 
42
42
  * Ruby 2.7 or newer
43
- * PostgreSQL 10.x or later (with headers, -dev packages, etc).
43
+ * PostgreSQL 10.x or later
44
+ * When installing the source gem: libpq with headers, -dev packages, etc.
44
45
 
45
- It usually works with earlier versions of Ruby/PostgreSQL as well, but those are
46
- not regularly tested.
47
46
 
47
+ ## How To Install
48
48
 
49
- ## Versioning
49
+ Install via RubyGems:
50
50
 
51
- We tag and release gems according to the [Semantic Versioning](http://semver.org/) principle.
51
+ gem install pg
52
52
 
53
- As a result of this policy, you can (and should) specify a dependency on this gem using the [Pessimistic Version Constraint](http://guides.rubygems.org/patterns/#pessimistic-version-constraint) with two digits of precision.
53
+ This installs the binary gem, specific to the running platform by default.
54
54
 
55
- For example:
55
+ ### Binary gem
56
56
 
57
- ```ruby
58
- spec.add_dependency 'pg', '~> 1.0'
59
- ```
57
+ The binary gems don't depend on the libpq package on the running system.
58
+ They have libpq builtin.
60
59
 
61
- ## How To Install
60
+ The gems for platform `x86_64-linux` and `aarch64-linux` run on Alpine Linux, but require the package `gcompat` there as long as we don't provide a native gem for platform `x86_64-linux-musl`. Install this package like so:
62
61
 
63
- Install via RubyGems:
62
+ apk add gcompat
64
63
 
65
- gem install pg
64
+ There is one use case the binary gems don't support: Retrieval of connection [options from LDAP](https://www.postgresql.org/docs/current/libpq-ldap.html). To support this `libldap` would be necessary, but it has a lot of dependencies. It doesn't seem to be a widely used feature and that it's worth to support it. If it's necessary, the source gem can be forced.
65
+
66
+ ### Source gem
67
+
68
+ The source gem can be forced by:
69
+
70
+ gem install pg --platform ruby
66
71
 
67
72
  You may need to specify the path to the 'pg_config' program installed with
68
73
  Postgres:
@@ -73,6 +78,28 @@ If you're installing via Bundler, you can provide compile hints like so:
73
78
 
74
79
  bundle config build.pg --with-pg-config=<path to pg_config>
75
80
 
81
+ ### Bundler
82
+
83
+ To make sure, the necessary platforms and the source gem are fetched by bundler, they can be added like so
84
+
85
+ ```
86
+ bundle lock --add-platform x86_64-linux
87
+ bundle lock --add-platform arm64-darwin
88
+ bundle lock --add-platform x64-mingw-ucrt
89
+ bundle lock --add-platform ruby
90
+ bundle package --all-platforms
91
+ ```
92
+
93
+ A re-run of `bundle package` is also necessary after `bundle update`, in order to retrieve the new specific gems of all platforms.
94
+
95
+ If the binary gems don't work for some reason, it's easy to force the usage of the source gem in the Gemfile:
96
+
97
+ ```
98
+ gem "pg", force_ruby_platform: true
99
+ ```
100
+
101
+ ### More
102
+
76
103
  See README-OS_X.rdoc for more information about installing under MacOS X, and
77
104
  README-Windows.rdoc for Windows build/installation instructions.
78
105
 
@@ -85,6 +112,19 @@ can be found in [the `certs` directory](https://github.com/ged/ruby-pg/tree/mast
85
112
  of the repository.
86
113
 
87
114
 
115
+ ## Versioning
116
+
117
+ We tag and release gems according to the [Semantic Versioning](http://semver.org/) principle.
118
+
119
+ As a result of this policy, you can (and should) specify a dependency on this gem using the [Pessimistic Version Constraint](http://guides.rubygems.org/patterns/#pessimistic-version-constraint) with two digits of precision.
120
+
121
+ For example:
122
+
123
+ ```ruby
124
+ spec.add_dependency 'pg', '~> 1.0'
125
+ ```
126
+
127
+
88
128
  ## Type Casts
89
129
 
90
130
  Pg can optionally type cast result values and query parameters in Ruby or
data/Rakefile CHANGED
@@ -50,7 +50,9 @@ CrossLibraries = [
50
50
  ['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
51
51
  ['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
52
52
  ['x86_64-linux', 'linux-x86_64', 'x86_64-linux-gnu'],
53
+ ['x86_64-linux-musl', 'linux-x86_64', 'x86_64-unknown-linux-musl'],
53
54
  ['aarch64-linux', 'linux-aarch64', 'aarch64-linux-gnu'],
55
+ ['aarch64-linux-musl', 'linux-aarch64', 'aarch64-linux-musl'],
54
56
  ['x86_64-darwin', 'darwin64-x86_64', 'x86_64-apple-darwin'],
55
57
  ['arm64-darwin', 'darwin64-arm64', 'arm64-apple-darwin'],
56
58
  ].map do |platform, openssl_config, toolchain|
@@ -68,7 +70,13 @@ Rake::ExtensionTask.new do |ext|
68
70
  ext.lib_dir = 'lib'
69
71
  ext.source_pattern = "*.{c,h}"
70
72
  ext.cross_compile = true
71
- ext.cross_platform = CrossLibraries.map(&:platform)
73
+
74
+ # Activate current cross compiled platform only.
75
+ # This is to work around the issue that `linux` platform is selected in `linux-musl` image.
76
+ ext.cross_platform = CrossLibraries.map(&:platform).select do |pl|
77
+ m = ENV["RCD_IMAGE"]&.match(/:(?<ruby_ver>[\d\.]+)-mri-(?<platform>[-\w]+)$/)
78
+ m && m[:platform] == pl
79
+ end
72
80
 
73
81
  ext.cross_config_options += CrossLibraries.map do |xlib|
74
82
  {
@@ -85,6 +93,9 @@ Rake::ExtensionTask.new do |ext|
85
93
  spec.files << "ports/#{spec.platform.to_s}/lib/libpq-ruby-pg.so.1" if spec.platform.to_s =~ /linux/
86
94
  spec.files << "ports/#{spec.platform.to_s}/lib/libpq-ruby-pg.1.dylib" if spec.platform.to_s =~ /darwin/
87
95
  spec.files << "ports/#{spec.platform.to_s}/lib/libpq.dll" if spec.platform.to_s =~ /mingw|mswin/
96
+
97
+ # Binary gems don't postgresql header+lib files
98
+ spec.metadata.delete("msys2_mingw_dependencies")
88
99
  end
89
100
  end
90
101
 
data/ext/pg_coder.c CHANGED
@@ -364,6 +364,7 @@ pg_coder_flags_get(VALUE self)
364
364
  * Specifies whether the assigned #elements_type requires quotation marks to
365
365
  * be transferred safely. Encoding with #needs_quotation=false is somewhat
366
366
  * faster.
367
+ * It is only used by text coders and ignored by binary coders.
367
368
  *
368
369
  * The default is +true+. This option is ignored for decoding of values.
369
370
  */
@@ -397,6 +398,7 @@ pg_coder_needs_quotation_get(VALUE self)
397
398
  * Specifies the character that separates values within the composite type.
398
399
  * The default is a comma.
399
400
  * This must be a single one-byte character.
401
+ * It is only used by text coders and ignored by binary coders.
400
402
  */
401
403
  static VALUE
402
404
  pg_coder_delimiter_set(VALUE self, VALUE delimiter)
data/lib/3.1/pg_ext.so CHANGED
Binary file
data/lib/3.2/pg_ext.so CHANGED
Binary file
data/lib/3.3/pg_ext.so CHANGED
Binary file
data/lib/3.4/pg_ext.so CHANGED
Binary file
data/lib/pg/coder.rb CHANGED
@@ -72,12 +72,13 @@ module PG
72
72
 
73
73
  class CompositeCoder < Coder
74
74
  def to_h
75
- { **super,
75
+ h = { **super,
76
76
  elements_type: elements_type,
77
77
  needs_quotation: needs_quotation?,
78
78
  delimiter: delimiter,
79
- dimensions: dimensions,
80
79
  }
80
+ h[:dimensions] = dimensions if dimensions # Write only when set, for Marshal compat with pg<1.6
81
+ h
81
82
  end
82
83
 
83
84
  def inspect
data/lib/pg/connection.rb CHANGED
@@ -763,7 +763,7 @@ class PG::Connection
763
763
  ihosts = iopts[:host]&.split(",", -1)
764
764
  ihostaddrs = iopts[:hostaddr]&.split(",", -1)
765
765
  iports = iopts[:port]&.split(",", -1)
766
- iports = iports * (ihosts || ihostaddrs).size if iports&.size == 1
766
+ iports = iports * (ihosts || ihostaddrs || [1]).size if iports&.size == 1
767
767
 
768
768
  idx = (ihosts || ihostaddrs || iports).index.with_index do |_, i|
769
769
  (ihosts ? ihosts[i] == host : true) &&
@@ -863,7 +863,9 @@ class PG::Connection
863
863
  # - All hosts are resolved before the first connection is tried.
864
864
  # This means that when +load_balance_hosts+ is set to +random+, then all resolved addresses are tried randomly in one level.
865
865
  # When a host resolves to more than one address, it is therefore tried more often than a host that has only one address.
866
- # - When a timeout occurs due to the value of +connect_timeout+, then the given +host+, +hostaddr+ and +port+ combination is not tried a second time, even if it is specified several times.
866
+ # - When a timeout occurs due to the value of +connect_timeout+, then the given +host+, +hostaddr+ and +port+ combination is not tried a second time, even if it's specified several times.
867
+ # It's still possible to do load balancing with +load_balance_hosts+ set to +random+ and to increase the number of connections a node gets, when the hostname is provided multiple times in the host string.
868
+ # This is because in non-timeout cases the host is tried multiple times.
867
869
  #
868
870
  def new(*args)
869
871
  conn = connect_to_hosts(*args)
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.6.0.rc2'
3
+ VERSION = '1.6.1'
4
4
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.rc2
4
+ version: 1.6.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Michael Granger
@@ -33,7 +33,7 @@ cert_chain:
33
33
  DrkJ9tVlPQtJB0LqT0tvBap4upnwT1xYq721b5dwH6AF4Pi6iz/dc5vnq1/MH8bV
34
34
  8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
35
35
  -----END CERTIFICATE-----
36
- date: 2025-07-16 00:00:00.000000000 Z
36
+ date: 1980-01-02 00:00:00.000000000 Z
37
37
  dependencies: []
38
38
  description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
39
39
  10 and later.
@@ -230,7 +230,6 @@ metadata:
230
230
  source_code_uri: https://github.com/ged/ruby-pg
231
231
  changelog_uri: https://github.com/ged/ruby-pg/blob/master/CHANGELOG.md
232
232
  documentation_uri: http://deveiate.org/code/pg
233
- msys2_mingw_dependencies: postgresql
234
233
  rdoc_options:
235
234
  - "--main"
236
235
  - README.md
@@ -252,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
251
  - !ruby/object:Gem::Version
253
252
  version: '0'
254
253
  requirements: []
255
- rubygems_version: 3.6.2
254
+ rubygems_version: 3.6.9
256
255
  specification_version: 4
257
256
  summary: Pg is the Ruby interface to the PostgreSQL RDBMS
258
257
  test_files: []
metadata.gz.sig CHANGED
Binary file