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

Fix a possible error while flushing the COPY data #4671

Merged
merged 1 commit into from Sep 5, 2022

Conversation

akuzm
Copy link
Member

@akuzm akuzm commented Sep 5, 2022

Apparently, pqFlush can report a success status, but the underlying
socket can become invalid at the same time. Check for this.

In passing, also change to the proper error reporting functions that
use the connection error information, where needed.

Apparently, pqFlush can report a success status, but the underlying
socket can become invalid at the same time. Check for this.

In passing, also change to the proper error reporting functions that
use the connection error information, where needed.
@codecov
Copy link

codecov bot commented Sep 5, 2022

Codecov Report

Merging #4671 (095b5a3) into main (1d4f90b) will increase coverage by 0.00%.
The diff coverage is 74.41%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4671   +/-   ##
=======================================
  Coverage   90.84%   90.84%           
=======================================
  Files         224      224           
  Lines       42273    42297   +24     
=======================================
+ Hits        38403    38425   +22     
- Misses       3870     3872    +2     
Impacted Files Coverage Δ
src/compat/compat.h 95.12% <ø> (ø)
src/ts_catalog/compression_chunk_size.c 46.66% <0.00%> (-0.80%) ⬇️
src/utils.c 63.76% <ø> (ø)
tsl/src/chunk_api.c 94.91% <ø> (ø)
tsl/src/remote/connection.c 88.49% <0.00%> (-0.23%) ⬇️
src/nodes/hypertable_modify.c 70.29% <60.00%> (+0.14%) ⬆️
tsl/src/nodes/decompress_chunk/decompress_chunk.c 95.20% <80.00%> (-0.14%) ⬇️
src/bgw/job_stat.c 90.14% <100.00%> (+0.80%) ⬆️
src/bgw/scheduler.c 86.54% <100.00%> (+0.11%) ⬆️
tsl/src/reorder.c 85.63% <100.00%> (+0.26%) ⬆️
... and 2 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 0d5049c...095b5a3. Read the comment docs.

@akuzm akuzm enabled auto-merge (rebase) September 5, 2022 11:42
@akuzm akuzm merged commit 533a138 into timescale:main Sep 5, 2022
@akuzm akuzm mentioned this pull request Sep 20, 2022
@jnidzwetzki jnidzwetzki added this to the TimescaleDB 2.8.1 milestone Sep 28, 2022
@jnidzwetzki jnidzwetzki mentioned this pull request Oct 5, 2022
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit to jnidzwetzki/timescaledb that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* timescale#4454 Keep locks after reading job status
* timescale#4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* timescale#4671 Fix a possible error while flushing the COPY data
* timescale#4675 Fix bad TupleTableSlot drop
* timescale#4676 Fix a deadlock when decompressing chunks and performing SELECTs
* timescale#4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* timescale#4694 Change parameter names of cagg_migrate procedure
* timescale#4698 Do not use row-by-row fetcher for parameterized plans
* timescale#4711 Remove support for procedures as custom checks
* timescale#4712 Fix assertion failure in constify_now
* timescale#4713 Fix Continuous Aggregate migration policies
* timescale#4720 Fix chunk exclusion for prepared statements and dst changes
* timescale#4726 Fix gapfill function signature
* timescale#4737 Fix join on time column of compressed chunk
* timescale#4738 Fix error when waiting for remote COPY to finish
* timescale#4739 Fix continuous aggregate migrate check constraint
* timescale#4760 Fix segfault when INNER JOINing hypertables
* timescale#4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit that referenced this pull request Oct 5, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* #4454 Keep locks after reading job status
* #4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* #4671 Fix a possible error while flushing the COPY data
* #4675 Fix bad TupleTableSlot drop
* #4676 Fix a deadlock when decompressing chunks and performing SELECTs
* #4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* #4694 Change parameter names of cagg_migrate procedure
* #4698 Do not use row-by-row fetcher for parameterized plans
* #4711 Remove support for procedures as custom checks
* #4712 Fix assertion failure in constify_now
* #4713 Fix Continuous Aggregate migration policies
* #4720 Fix chunk exclusion for prepared statements and dst changes
* #4726 Fix gapfill function signature
* #4737 Fix join on time column of compressed chunk
* #4738 Fix error when waiting for remote COPY to finish
* #4739 Fix continuous aggregate migrate check constraint
* #4760 Fix segfault when INNER JOINing hypertables
* #4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
jnidzwetzki added a commit that referenced this pull request Oct 6, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.

**Bugfixes**
* #4454 Keep locks after reading job status
* #4658 Fix error when querying a compressed hypertable with compress_segmentby on an enum column
* #4671 Fix a possible error while flushing the COPY data
* #4675 Fix bad TupleTableSlot drop
* #4676 Fix a deadlock when decompressing chunks and performing SELECTs
* #4685 Fix chunk exclusion for space partitions in SELECT FOR UPDATE queries
* #4694 Change parameter names of cagg_migrate procedure
* #4698 Do not use row-by-row fetcher for parameterized plans
* #4711 Remove support for procedures as custom checks
* #4712 Fix assertion failure in constify_now
* #4713 Fix Continuous Aggregate migration policies
* #4720 Fix chunk exclusion for prepared statements and dst changes
* #4726 Fix gapfill function signature
* #4737 Fix join on time column of compressed chunk
* #4738 Fix error when waiting for remote COPY to finish
* #4739 Fix continuous aggregate migrate check constraint
* #4760 Fix segfault when INNER JOINing hypertables
* #4767 Fix permission issues on index creation for CAggs

**Thanks**
* @boxhock and @cocowalla for reporting a segfault when JOINing hypertables
* @carobme for reporting constraint error during continuous aggregate migration
* @choisnetm, @dustinsorensen, @jayadevanm and @joeyberkovitz for reporting a problem with JOINs on compressed hypertables
* @daniel-k for reporting a background worker crash
* @justinpryzby for reporting an error when compressing very wide tables
* @maxtwardowski for reporting problems with chunk exclusion and space partitions
* @yuezhihan for reporting GROUP BY error when having compress_segmentby on an enum column
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