Backfill
process never completes during periods of high INSERT
query rates
#583
Milestone
Backfill
process never completes during periods of high INSERT
query rates
#583
Hello team,
For testing, I tried this example 14_add_reviews_table.json to create a
reviews
table and then 17_add_rating_column.json to add arating
column.I have inserted 50k dummy rows initially to this table.
Now to test
alter column
operation, i started 18_change_column_type.json migration and i ranpgbench
parallelly as follows,insert_script.sql
Since the table is loaded with high
INSERT
query rates frompgbench
, the backfill procedure is not ending. Though initially 50k rows was present in the table, the backfilling continued for all the newer rows inserted by pgbench.Since the
trigger
is created before starting backfill, i think it is redundant to backfill the newer rows which are inserted aftertrigger
creation as backfill for this rows will be taken care by thetrigger
created earlier. Below is the console screenshot where the backfilling continued for 6 million+ rows created withpgbench
and running infinitely.In a large scale production environment, we can expect high volume of
INSERT
queries because multiple connections parallelly sends theINSERT
queries. In such case, what should be done to avoid infinite backfilling problem? Should we blockINSERT
queries by manually acquiring someLOCK
until backfill is completed ? If so, does it violates the concept of zero-downtime ?The text was updated successfully, but these errors were encountered: