Re: [HACKERS] logical replication busy-waiting on a lock - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] logical replication busy-waiting on a lock
Date
Msg-id 20170608230650.d2rilnhyw6eim6mm@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] logical replication busy-waiting on a lock  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] logical replication busy-waiting on a lock
List pgsql-hackers
Hi,

On 2017-06-03 04:50:00 +0200, Petr Jelinek wrote:
> One thing I don't like is the GetLastLocalTransactionId() that I had to
> add because we clear the proc->lxid before we get to AtEOXact_Snapshot()
> but I don't have better solution there.

I dislike that quite a bit - how about we instead just change the
information we keep in exportedSnapshots?  I.e. store a pointer to an
struct ExportedSnapshot
{   char *exportedAs;   Snapshot snapshot;
}

Then we can get rid of that relatively ugly list_length() business too.

- Andres



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Get stuck when dropping a subscription duringsynchronizing table
Next
From: Thomas Munro
Date:
Subject: Re: [HACKERS] PG10 transition tables, wCTEs and multiple operationson the same table