Skip to content

[pull] master from ged:master#3

Open
pull[bot] wants to merge 747 commits intomajacQ:masterfrom
ged:master
Open

[pull] master from ged:master#3
pull[bot] wants to merge 747 commits intomajacQ:masterfrom
ged:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Dec 2, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Dec 2, 2021
@atomist atomist bot added auto-branch-delete:on-close Delete branch when pull request gets closed auto-merge-method:merge Auto-merge with merge commit auto-merge:on-bpr-success Auto-merge on passed branch protection rule labels Dec 2, 2021
@larskanis larskanis force-pushed the master branch 3 times, most recently from 29ed324 to c463267 Compare January 14, 2022 20:00
@larskanis larskanis force-pushed the master branch 4 times, most recently from 2b7e4fe to daec80f Compare February 28, 2024 14:01
jeltz and others added 30 commits January 15, 2026 19:09
The only user of the path to the data directory was test cases which
need to access to client ceritificate CA file, so expose that instead.
These global variables only made the code less clear and they were not
used anywhere else so jsut inline the values.
The new structure groups similar things so it is easier to understand
what is going on.
The mnemoization only made the code harder to understand and was broken
anyway on machines where pg_config is not in the current path.
Improve readbaility of the code by splitting it into multiple functions,
one for initializing the PostgreSQL cluster and another for starting the
database server.
To make tests a little bit faster, as proposed in #689.

And fix indention by the way.
```
compiling ../../../../ext/pg_copy_coder.c
../../../../ext/pg_copy_coder.c:721:41: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (12 chars into 11 available) [-Wunterminated-string-initialization]
  721 | static const char BinarySignature[11] = "PGCOPY\n\377\r\n\0";
      |                                         ^~~~~~~~~~~~~~~~~~~~
```
The OpenSSL default is to add a arch dependent suffix to the path, but this can be disabled per configure option.
Use a "lib" directory for openssl without arch
They were just for performance testing, but they have the same speed as :symbol.
If the pg_ctl binary was not in the path we would fail to stop the
running database clusters so let's use our helper for getting the path
to the binary.

To keep the code simple we also move the stopping of the existing
cluster to the code which starts it since that is only where we,
at least currently, knows the path the the binaries.
Fix stopping of old test cluster when pg_ctl is not in the path
PostgreSQL 18 added PQfullProtocolVersion() which return the full
protocol version used including the minor version, e.g. 3.0 or 3.2
rather than just 3. The new methods PG::Connection#full_protocol_version
returns the version as major version * 10000 + minor version, e.g. 30002
for version 3.2.
We never use this feature so it is just dead code and if we would ever
want to do it it would be trivial to code.
This command line argument was most likely leftover debug code.
Add method for getting the full protocol version
Remove :static_symbol result field names
The headers of libpq already give us nice defines for almost all
features we want to support based when available so let's just trust
libpq-fe.h to simplify our code.

The only exception is PQresultMemorySize() which we need to check for
manually since it was added in PostgreSQL 12, before libq-fe.h started
adding defines for new features.
Trust libpq-fe.h's defines over probing in extconf.rb
That code was introduced 13 years ago.
I think it can be removed now, since this was an issue in an old ruby version.
If the rpath is configured in ruby, then dir_config will use it, otherwise it shouldn't.

Fixes #183
Remove enforced rpath addition when no rpath is configured
The documentation says that this is necessary:
https://github.com/ruby/ruby/blob/86049a98754507a480e657274b4d38b07c46e6ea/include/ruby/internal/gc.h#L397

Also use the more descriptive alias function rb_gc_register_address instead of rb_global_variable.
Move VALUE address registration to before assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull auto-branch-delete:on-close Delete branch when pull request gets closed auto-merge:on-bpr-success Auto-merge on passed branch protection rule auto-merge-method:merge Auto-merge with merge commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants