Re: [HACKERS] Issue with logical replication: MyPgXact->xmin alreadyis valid
От | Konstantin Knizhnik |
---|---|
Тема | Re: [HACKERS] Issue with logical replication: MyPgXact->xmin alreadyis valid |
Дата | |
Msg-id | 47214773-0f2b-1836-0e7a-ec890f3cc296@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: [HACKERS] Issue with logical replication: MyPgXact->xmin alreadyis valid (Petr Jelinek <petr.jelinek@2ndquadrant.com>) |
Ответы |
Re: [HACKERS] Issue with logical replication: MyPgXact->xmin alreadyis valid
|
Список | pgsql-hackers |
On 06.10.2017 15:29, Petr Jelinek wrote: > On 06/10/17 12:16, Konstantin Knizhnik wrote: >> When creating logical replication slots we quite often get the following >> error: >> >> ERROR: cannot build an initial slot snapshot when MyPgXact->xmin >> already is valid >> >> which cause restart of WAL sender. >> The comment to this line doesn't clarify much: >> >> /* so we don't overwrite the existing value */ >> if (TransactionIdIsValid(MyPgXact->xmin)) >> elog(ERROR, "cannot build an initial slot snapshot when >> MyPgXact->xmin already is valid"); >> I wonder if it is normal situation or something goes wrong? >> > Hi, > > no it's not normal situation, it seems you are doing something that > assigns xid before you run the CREATE_REPLICATION_SLOT command on that > connection. I have not doing something in this connection: it is wal sender executing CREATE_REPLICATION_SLOT replication command. Please look at the stack in my original e-mail. It shows who and when is setting MyPgXact->xmin. It is GetSnapshotData called because of reloading configuration settings. And configuration setting are reloaded because our application is updating "synchronous_standby_names". -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: