Upload
eizwakh
View
220
Download
0
Embed Size (px)
Citation preview
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 1/12
BackfllBECAUSE SOMETIMES YOU NEED TO GO BACK, SOMETIMES FILL THINGS AND SOMETIMES BOTH.
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 2/12
The Back.
Walk the tale ack!a"#$.
U$e the $e%&e'ce.
Walk $h("t #)$ta'ce$.
Walk %&)ckl*.
+e$t et!ee' !alk$.
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 3/12
B&t, &t-!h*
Beca&$e tale l(ck)'/ )$ a th)'/.
L(ck)'/, l)ke $(0
Foo Fee Fie Fo Fum
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 4/12
D('2t !alk !he' *(& ca' "&'- sequences have holes
H(le$ Wh* #)# )t ha3e t( e h(le*
update foo set edit = ‘ja’ where field = true
ID Field Edit
1444 t"&e '('
544 t"&e '('677 8al$e '('
679 8al$e '('
675 8al$e '('
676 t"&e '('
1 t"&e '('
s
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 5/12
The F)ll
U;#ate $(<eth)'/.
N(t a'*th)'/. H(;e8&ll* '(t e3e"*th)'/.
U;#ate all *(& ca' !he' *(& ha3e a cha'ce.
D('2t "e;eat *(&"$el8. Ye$, )t a;;l)e$ t( #ataa$e$ t((. A l(t.
What )$ &;#ate#, $ta*$ &;#ate#.
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 6/12
Back > F)ll ? BackF)ll
S(, *(& /( ack. A'# fll th)'/$.
A'# the' *(& /( ack $(<e <("e. A'# fll <("e th)'/$.
A'# the' $(<e <("e. A'#-
I8 ('l* I ha# $(<eth)'/ t( #( th)$ 8(" <e-l)ke a <ach)'e ("$(<eth)'/.
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 7/12
De$)/' c('$)#e"at)('$
KISS.
I#e<;(te'ce )$ a l&@&"*. It $h(&l#'2t e, &t )t )$.
Check;()'t ;"(/"e$$ <a#e.
E3e"*('e2$ <)lea/e <a*!)ll 3a"*.
D(#/e 8e'ce ;($t ;"(le<$.
+e<e<e", the"e a"e 9 (@e$.
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 8/12
A&t(<ate a'# AFK Resque to the…well, rescue
+el* (' e$tal)$he# 8"a<e!("k$. A8te" all, the*2"e e$tal)$he# 8("a "ea$('.
+e$%&eS)#ek)% ca' #( the (
A## <a'* t)<e$, #('2t <<);l*.
It2$ a 8&' th(&/ht a'# c&$$)'/ e@;e")<e't th(&/h.
Sa3e the $tate.
At(<)c S)'/le DB call
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 9/12
Wa)t, $( +e$%&e (" S)#ek)% O"-
E@te'$)le t( a'* )'te"8ace that !)ll all(! $(<e 8("< (8e'%&e&e
He'ce ;l&//ale )'t( all (8 the 9(@e$.
S;eak)'/ (8 %&e&)'/- &')%&e'e$$ D( '(t !a't t( th"ea# ackfll$.
O'e ;e" tale &'#e" &;#ate.
Ca3eat0 I#e't)t*. FD e@;l($)(', !th
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 10/12
The /)8t that kee;$ (' /)3)'/
W("ke" c('t"(l 8"(< the UI, 8"(< the CLI.
")(")t* c('t"(l, 8"(< the %&e&e$.
+et"* 8"(< )'te"8ace.
A##e# <a$te" (3e"")#e )' +e#)$ "&'t)<e, #e;l(* 8"eeatchJ$)e c('t"(l
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 11/12
Aha, &t !hat )8 I
K)ll *(&" !("ke".
K)ll *(&" %&e&e.
K)ll *(&" %&e"*.
K)ll *(&" acke'#.
K)ll *(&" #ataa$e.
7/23/2019 Backfills - A guide on backfill frameworks in PostgreSQL
http://slidepdf.com/reader/full/backfills-a-guide-on-backfill-frameworks-in-postgresql 12/12
G"eat, $( !hat e@actl* #( I 'ee#t( #(
G( t( /)t.e'(3a.c(</e<$ackfll
F(ll(! the )'$t"&ct)('$
Ye$, I ha3e te$te# the<.
Ye$, I23e ha# (the" ;e(;le te$t the<.
Ye$, )t !a$ (' #)e"e't #e3el(;<e't e'3)"('<e't$.
The )'$tallat)(' (8 the e'/)'e )$ ('l* ('ce ;e" (@. O'ce)'$talle#, all 8&t&"e ackfll$ !)ll ('l* e'ta)l the c"eat)(' (8 a$)'/le <)/"at)('.