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

Add shmem_request_hook #4411

Merged
merged 1 commit into from Jun 3, 2022
Merged

Add shmem_request_hook #4411

merged 1 commit into from Jun 3, 2022

Conversation

svenklemm
Copy link
Member

This patch consolidates all shared memory requests in a
shmem_request_hook. While there are no strict requirements when
to request shared memory for PG < 15 in PG 15 it has to happen
in the shmem_request_hook otherwise the request will be blocked.

postgres/postgres@4f2400cb

@svenklemm svenklemm requested a review from a team as a code owner June 2, 2022 04:06
@svenklemm svenklemm requested review from RafiaSabih and gayyappan and removed request for a team June 2, 2022 04:06
src/loader/loader.c Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #4411 (4328758) into main (12574dc) will increase coverage by 0.00%.
The diff coverage is 92.98%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4411   +/-   ##
=======================================
  Coverage   90.84%   90.84%           
=======================================
  Files         220      220           
  Lines       40505    40557   +52     
=======================================
+ Hits        36795    36844   +49     
- Misses       3710     3713    +3     
Impacted Files Coverage Δ
src/compat/compat.h 94.73% <ø> (ø)
src/nodes/chunk_insert_state.c 97.62% <ø> (ø)
src/utils.c 68.68% <ø> (ø)
src/utils.h 82.60% <ø> (ø)
tsl/src/nodes/data_node_dispatch.c 96.49% <83.33%> (-0.86%) ⬇️
tsl/src/nodes/data_node_copy.c 94.90% <85.00%> (-1.50%) ⬇️
src/bgw/job.c 93.04% <92.30%> (+0.16%) ⬆️
tsl/src/compression/create.c 96.80% <97.56%> (+0.19%) ⬆️
src/bgw/scheduler.c 82.89% <100.00%> (-0.06%) ⬇️
src/loader/loader.c 94.50% <100.00%> (+0.04%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f059e00...4328758. Read the comment docs.

This patch consolidates all shared memory requests in a
shmem_request_hook. While there are no strict requirements when
to request shared memory for PG < 15 in PG 15 it has to happen
in the shmem_request_hook otherwise the request will be blocked.

postgres/postgres@4f2400cb
@svenklemm svenklemm merged commit 1ef515e into timescale:main Jun 3, 2022
@mkindahl mkindahl mentioned this pull request Jul 5, 2022
mkindahl added a commit that referenced this pull request Jul 7, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* #4494 Handle timescaledb versions aptly in multinode
* #4493 Segfault when executing IMMUTABLE functions
* #4482 Fix race conditions during chunk (de)compression
* #4367 Improved buffer management in the copy operator
* #4375 Don't ask for orderby column if default already set
* #4400 Use our implementation of `find_em_expr_for_rel` for PG15+
* #4408 Fix crash during insert into distributed hypertable
* #4411 Add `shmem_request_hook`
* #4437 Fix segfault in subscription_exec
* #4442 Fix perms in copy/move chunk
* #4450 Retain hypertable ownership on `attach_data_node`
* #4451 Repair numeric partial state on the fly
* #4463 Fix empty bytea handlng with distributed tables
* #4469 Better superuser handling for `move_chunk`

**Features**
* #4244 Function telemetry
* #4287 Add internal api for foreign table chunk
* #4470 Block drop chunk if chunk is in frozen state
* #4464 Add internal api to associate a hypertable with custom jobs

**Thanks**
* @xin-hedera Finding bug in empty bytea values for distributed tables
* @jflambert for reporting a bug with IMMUTABLE functions
* @nikugogoi for reporting a bug with CTEs and upserts on distributed hypertables
mkindahl added a commit that referenced this pull request Jul 7, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* #4494 Handle timescaledb versions aptly in multinode
* #4493 Segfault when executing IMMUTABLE functions
* #4482 Fix race conditions during chunk (de)compression
* #4367 Improved buffer management in the copy operator
* #4375 Don't ask for orderby column if default already set
* #4400 Use our implementation of `find_em_expr_for_rel` for PG15+
* #4408 Fix crash during insert into distributed hypertable
* #4411 Add `shmem_request_hook`
* #4437 Fix segfault in subscription_exec
* #4442 Fix perms in copy/move chunk
* #4450 Retain hypertable ownership on `attach_data_node`
* #4451 Repair numeric partial state on the fly
* #4463 Fix empty bytea handlng with distributed tables
* #4469 Better superuser handling for `move_chunk`

**Features**
* #4244 Function telemetry
* #4287 Add internal api for foreign table chunk
* #4470 Block drop chunk if chunk is in frozen state
* #4464 Add internal api to associate a hypertable with custom jobs

**Thanks**
* @xin-hedera Finding bug in empty bytea values for distributed tables
* @jflambert for reporting a bug with IMMUTABLE functions
* @nikugogoi for reporting a bug with CTEs and upserts on distributed hypertables
mkindahl added a commit that referenced this pull request Jul 7, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* #4494 Handle timescaledb versions aptly in multinode
* #4493 Segfault when executing IMMUTABLE functions
* #4482 Fix race conditions during chunk (de)compression
* #4367 Improved buffer management in the copy operator
* #4375 Don't ask for orderby column if default already set
* #4400 Use our implementation of `find_em_expr_for_rel` for PG15+
* #4408 Fix crash during insert into distributed hypertable
* #4411 Add `shmem_request_hook`
* #4437 Fix segfault in subscription_exec
* #4442 Fix perms in copy/move chunk
* #4450 Retain hypertable ownership on `attach_data_node`
* #4451 Repair numeric partial state on the fly
* #4463 Fix empty bytea handlng with distributed tables
* #4469 Better superuser handling for `move_chunk`

**Features**
* #4244 Function telemetry
* #4287 Add internal api for foreign table chunk
* #4470 Block drop chunk if chunk is in frozen state
* #4464 Add internal api to associate a hypertable with custom jobs

**Thanks**
* @xin-hedera Finding bug in empty bytea values for distributed tables
* @jflambert for reporting a bug with IMMUTABLE functions
* @nikugogoi for reporting a bug with CTEs and upserts on distributed hypertables
mkindahl added a commit that referenced this pull request Jul 7, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* #4494 Handle timescaledb versions aptly in multinode
* #4493 Segfault when executing IMMUTABLE functions
* #4482 Fix race conditions during chunk (de)compression
* #4367 Improved buffer management in the copy operator
* #4375 Don't ask for orderby column if default already set
* #4400 Use our implementation of `find_em_expr_for_rel` for PG15+
* #4408 Fix crash during insert into distributed hypertable
* #4411 Add `shmem_request_hook`
* #4437 Fix segfault in subscription_exec
* #4442 Fix perms in copy/move chunk
* #4450 Retain hypertable ownership on `attach_data_node`
* #4451 Repair numeric partial state on the fly
* #4463 Fix empty bytea handlng with distributed tables
* #4469 Better superuser handling for `move_chunk`

**Features**
* #4244 Function telemetry
* #4287 Add internal api for foreign table chunk
* #4470 Block drop chunk if chunk is in frozen state
* #4464 Add internal api to associate a hypertable with custom jobs

**Thanks**
* @xin-hedera Finding bug in empty bytea values for distributed tables
* @jflambert for reporting a bug with IMMUTABLE functions
* @nikugogoi for reporting a bug with CTEs and upserts on distributed hypertables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants