From: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
---|---|
To: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Subject: | Re: Issue with logical replication: MyPgXact->xmin already is valid |
Date: | 2017-10-07 16:23:04 |
Message-ID: | 59D8FF68.9050707@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/07/2017 04:26 PM, Petr Jelinek wrote:
>
> Hmm so you start transaction (you have to when running
> CREATE_REPLICATION_SLOT with USE_SNAPSHOT parameter). And while the slot
> is being created the config is reloaded. And since now you are in
> transaction the tsearch hook for GUC processing tries to access catalogs
> which sets the xmin for the transaction.
Actually this slot is implicitly created by LogicalRepSyncTableStart to perform initial data sync.
>
> That's not good, but I can't really say I have idea about what to do
> with it other than to set some kind of flag saying that logical decoding
> snapshot is being built and using that to skip catalog access which does
> not seem very pretty.
>
It is not quite clear from the comment why it is not possible to overwrite MyPgXact->xmin or just use existed value.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-07 16:49:08 | Re: separate serial_schedule useful? |
Previous Message | Tom Lane | 2017-10-07 16:19:01 | Re: Discussion on missing optimizations |