Ntlafatso ea PostgreSQL. Ho lokolloa ha reshape, sesebelisoa sa ho fallela ho schema se secha ntle le ho emisa mosebetsi

Lintlafatso tse lokisoang li hlahisitsoe bakeng sa makala ohle a tšehetsoeng a PostgreSQL: 14.2, 13.6, 12.10, 11.15 le 10.20, a lokisa liphoso tse 55 tse khethiloeng likhoeling tse tharo tse fetileng. Har'a lintho tse ling, re na le mathata a tsitsitseng ao, maemong a sa tloaelehang, a lebisitseng ho index ea bobolu ha ho fetola liketane tse HOT (qubu-tuple feela) nakong ea ts'ebetso ea VACUUM kapa ha ho etsoa ts'ebetso ea REINDEX CONCURRENTLY ho li-index litafoleng tse sebelisang mochine oa ho boloka TOAST.

Ho senyehe ho tsitsitseng ha ho etsoa ALTER STATISTICS le ha ho khutlisa data ka mefuta ea mefuta e mengata. Litšitiso ho moralo oa lipotso tse bakileng liphetho tse fosahetseng li lokisitsoe. Mehopolo e tsitsitseng e lutla ha u nchafatsa li-index u sebelisa lipolelo le ha u etsa RESSIGN OWNED BY operation holim'a lintho tse ngata. Kaho ea lipalo-palo tse tsoetseng pele bakeng sa litafole tse arohaneng li fanoe.

Ho phaella moo, re ka hlokomela ho lokolloa ha sesebelisoa sa reshape, se u lumellang hore u etse lintlafatso tse rarahaneng ho schema ea data ho PostgreSQL ntle le ho emisa mosebetsi, oo tlas'a maemo a tloaelehileng a hlokang liphetoho tsa matsoho le ho koaloa ha nakoana ha litšebeletso ho sebelisa database. Sesebelisoa se etsa hore ho khonehe ho fetoha ho tloha lenaneong la khale la data ho ea ho le lecha ntle le ho thibela nako e telele le ntle le ho sitisa potoloho ea kopo. Ts'ebeliso e iketsetsa lipono tsa litafole tseo lits'ebetso li tsoelang pele ho sebetsa le tsona nakong ea phalliso ea schema ea data, hape e hlophisa lintho tse susumetsang tse fetolelang ts'ebetso ea ho eketsa le ho hlakola data lipakeng tsa schemas tsa khale le tse ncha.

Ka hona, ha u sebelisa reshape nakong ea ho falla, schema ea khale le e ncha e lula e fumaneha ka nako e le 'ngoe' me likopo li ka fetisetsoa butle-butle ho schema e ncha ntle le ho emisa mosebetsi (ka mekhoa e meholo ea litšebeletso, bahlokomeli ba ka nkeloa sebaka butle-butle ho tloha khale ho ea ho e ncha). Hang ha ho falla ha likopo ho schema se secha ho phethiloe, maikutlo le lintho tse susumetsang tse entsoeng ho boloka tšehetso bakeng sa schema ea khale lia tlosoa. Haeba mathata a lits'ebetso a tsejoa nakong ea ho falla, o ka fetola phetoho ea schema 'me u khutlela boemong ba khale.

Source: opennet.ru

Eketsa ka tlhaloso