Re: Initial COPY of Logical Replication is too slow
| От | Marcos Pegoraro |
|---|---|
| Тема | Re: Initial COPY of Logical Replication is too slow |
| Дата | |
| Msg-id | CAB-JLwZpp=7c9_r0beWWJxRh2BS_2Vvth8UDv7H57DBeaqggVg@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Initial COPY of Logical Replication is too slow (Masahiko Sawada <sawada.mshk@gmail.com>) |
| Ответы |
Re: Initial COPY of Logical Replication is too slow
|
| Список | pgsql-hackers |
Em sex., 19 de dez. de 2025 às 22:59, Masahiko Sawada <sawada.mshk@gmail.com> escreveu:
Yeah, if we pass a publication that a lot of tables belong to to
pg_get_publication_tables(), it could take a long time to return as it
needs to construct many entries.
Well, I don't know how to help but I'm sure it's working badly.
Today I added some fields on my server, then seeing logs I could see how slow this process is.
duration: 2213.872 ms statement: SELECT DISTINCT (CASE WHEN (array_length(gpt.attrs, 1) = c.relnatts) THEN NULL ELSE gpt.attrs END) FROM pg_publication p, LATERAL pg_get_publication_tables(p.pubname) gpt, pg_class c WHERE gpt.relid = 274376788 AND c.oid = gpt.relid AND p.pubname IN ( 'mypub' )
2 seconds to get the list of fields of a table is really too slow.
How can we solve this ?
How can we solve this ?
regards
Marcos
В списке pgsql-hackers по дате отправления: