From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dimitri Maziuk <dmaziuk@bmrb.wisc.edu>
To: pgsql-general@lists.postgresql.org
Subject: Re: logical replication snapshots
Date: Thu, 26 Jul 2018 14:39:22 -0700
Message-ID: <40f0b879-2b5b-05ad-57ba-3688510be87d@aklaver.com> (raw)
In-Reply-To: <00acc822-e5d6-b9ad-43a9-e989d8581ae7@bmrb.wisc.edu>
References: <20180724172115.ztthbxmfgucnuuq3@alvherre.pgsql>
<f1fe2e11-c298-0383-5df2-e0dbb2a9a68b@bmrb.wisc.edu>
<20180724184337.k6nq7k3cq7xoorjn@alap3.anarazel.de>
<04dcfd2d-6201-09e7-4209-9894d669f694@bmrb.wisc.edu>
<20180725152827.g22qmue3wgycifjh@alap3.anarazel.de>
<9b9a72f4-44c8-5e78-8814-fdc39ca3a3ad@bmrb.wisc.edu>
<cade60b5-cdc5-a9ed-68b8-173f394a9ce5@aklaver.com>
<a1b9701e-5249-2a61-6a37-f8f02c3fe707@bmrb.wisc.edu>
<1c539619-7b72-3669-81cd-2a55352b1008@aklaver.com>
<20180726005706.gzinfqg7mjfnsf6g@alap3.anarazel.de>
<c04c0920-4085-8647-dc03-aae453bb2aa9@bmrb.wisc.edu>
<10933bb0-5a3b-4ed2-fc6c-2a712510ef9b@aklaver.com>
<00acc822-e5d6-b9ad-43a9-e989d8581ae7@bmrb.wisc.edu>
On 07/26/2018 02:06 PM, Dimitri Maziuk wrote:
> On 07/26/2018 02:54 PM, Adrian Klaver wrote:
>> On 07/26/2018 10:54 AM, Dimitri Maziuk wrote:
>
>>> I'm not sure what happened, I remember the initial sync of that
>>> particular schema failing on one table only, but looking at it now, all
>>> tables are empty on the subscriber.
>>
>> To me that indicates all the syncs failed.
>
> Yeah, well... the error message said one table failed and I went off to
> find out why (a co-worker added a column behind everyone's back) and
> never checked 'count(*)' on the other tables.
The thing that has me somewhat confused is:
ERROR: permission denied for schema macromolecules
I would thought the replication user could access that.
Is there something special about that schema?
Did the user role you set up for replication have the REPLICATION
attribute or was it a superuser?
>
> ... deleting files in ~snapshots
>> Again I don't know the answer to this. Are you trying this on a test
>> setup or production one?
>
> I could fire up another instance on a different port off the now-broken
> $PGDATA easily enough and test. However if whatever uses those files
> needs to start from the very first file and "replay" them in sequence,
> that won't work.
If I remember back correctly this is because the server chokes on the 13
million files in the ~/pg_logical/snapshot directly.
I wonder what happens if you change(on test setup)?:
wal_level = logical
to
wal_level = replica
>
> The files are named like 19_E6942440.snap which presumably corresponds
> to "LOG: logical decoding found consistent point at 19/E6942440" and
> they seem to get progressively larger. That suggest that maybe just one
> (the newest one) could be good enough...
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, dmaziuk@bmrb.wisc.edu
Subject: Re: logical replication snapshots
In-Reply-To: <40f0b879-2b5b-05ad-57ba-3688510be87d@aklaver.com>
References: <20180724172115.ztthbxmfgucnuuq3@alvherre.pgsql> <f1fe2e11-c298-0383-5df2-e0dbb2a9a68b@bmrb.wisc.edu> <20180724184337.k6nq7k3cq7xoorjn@alap3.anarazel.de> <04dcfd2d-6201-09e7-4209-9894d669f694@bmrb.wisc.edu> <20180725152827.g22qmue3wgycifjh@alap3.anarazel.de> <9b9a72f4-44c8-5e78-8814-fdc39ca3a3ad@bmrb.wisc.edu> <cade60b5-cdc5-a9ed-68b8-173f394a9ce5@aklaver.com> <a1b9701e-5249-2a61-6a37-f8f02c3fe707@bmrb.wisc.edu> <1c539619-7b72-3669-81cd-2a55352b1008@aklaver.com> <20180726005706.gzinfqg7mjfnsf6g@alap3.anarazel.de> <c04c0920-4085-8647-dc03-aae453bb2aa9@bmrb.wisc.edu> <10933bb0-5a3b-4ed2-fc6c-2a712510ef9b@aklaver.com> <00acc822-e5d6-b9ad-43a9-e989d8581ae7@bmrb.wisc.edu> <40f0b879-2b5b-05ad-57ba-3688510be87d@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox