Comments (6)
I can't tell much w/o seeing any performance data. Do you say that processing of the table took only about a minute? If it took rather long time, the slow down could be caused by VACUUM because rows deleted while pg_squeeze is processing given table cannot be processed by VACUUM until pg_squeeze is done with that table. Not sure if this could happen in your database.
from pg_squeeze.
More details on graph:
- green - postgres disk usage
- violet - docker container memory usage - irrelevant
- number 1 -
pg_sqeeze
worker start its job and finished it at the end of the small peak (at least that's where the xlock timeout occurred - fromsqueeze.errors
- I assume thatpq_squeeze
stopped working at that point) - number 2, 3 -
pgcompacttable
tests - irrelevant
There is a constant postgres db disk size grow indicated by green line as new items are arriving, then around 1 there is a small peak followed by 2 hours slowdown and after that grow rate is normalized.
Do you mean that VACUUM
was triggered by pg_squeeze
?
from pg_squeeze.
Thanks for the chart. I don't think that VACUUM was triggered by pg_squeeze. What I say is that pg_squeeze makes deleted rows unreachable by VACUUM - in particular the rows deleted while pg_squeeze was processing particular table. So if pg_squeeze fails to process the table, those deleted rows become visible to VACUUM, and thus VACUUM suddenly has additional work to do. The amount of this additional work should be proportional to the time spent by pg_squeeze on the table. However it's still not clear to me how long this period was in your system. Can you please check the "last_task_created" and "last_task_finished" columns of the "tables_internal" table in the "squeeze" schema?
from pg_squeeze.
ok, thanks.
last_task_created
about 1:00
last_task_finished
about 20s later
so the period that pg_squeeze
was working was about 20s
from pg_squeeze.
One problem I found is that the replication slot is not released immediately if the squeeze_table() function raises ERROR while being called by the background worker. This is because the worker calls the function via process_current_task() function, and that one catches the ERROR in order to write the error message into the squeeze.errors table. Thus the slot is dropped either on the next call of squeeze_table() or when the worker exits. I need to think how to fix this.
However it's still not clear to me how this can slow down the database. If the slot caused VACUUM to be overloaded as I suspected earlier, some time would be needed for rather huge amount of dead tuples to cumulate, however your chart shows that the database slows down immediately.
Besides that, replication slot prevents WAL files from being deleted / archived, so the disk usage would keep increasing if the slot was the problem. However the chart shows the opposite: disk usage almost stops growing for some time. Maybe you have WAL on a different disk whose monitoring is not included in that chart.
In any case, please check if your WAL archiving is not delayed by the replication slot. If it seems to be, please stop or restart the squeeze worker.
from pg_squeeze.
The replication slot leak is now fixed in the master branch. If you've got suitable environment, please test if it happens to fix the performance issue. The fix will be included in the 1.3 release soon.
from pg_squeeze.
Related Issues (20)
- Scheduling pg_squeeze not working HOT 25
- ERROR: Failed to find target tuple HOT 5
- Question: How to estimate pg_squeeze run overhead properly? HOT 4
- Running squeeze causes continuous lag build up in logical replication architecture HOT 6
- PostgreSQL 15 support HOT 4
- Disk space requirements of pg_squeeze? HOT 2
- pg squeeze will support view and materialized view? HOT 4
- make fails with pg_squeeze.c:2629:3: error: too few arguments to function ‘NewHeapCreateToastTable’ HOT 11
- multiple launch of pg_squeeze HOT 3
- Issue while running make on RHEL 8 HOT 7
- Use squeeze during tpcc benchmark running may cause data inconsistent HOT 5
- PostgreSQL 16 support HOT 3
- [HELP] use pg_squeeze in pgxl HOT 3
- Regression tests unstable HOT 2
- RE: `pg_squeeze` is known to be compatible with MS Windows HOT 8
- Regression test failed in PG 16 HOT 11
- pg_squeeze stop working with error "duplicate key value violates unique constraint "pg_replication_origin_roname_index"" HOT 2
- "prev_shmem_request_hook" prevents the database from starting. HOT 8
- Unique constraint on squeeze table HOT 6
- Segmentation fault HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg_squeeze.