On Mon, Mar 8, 2021 at 4:20 PM vignesh C <vignes...@gmail.com> wrote:
>
> On Mon, Mar 8, 2021 at 11:30 AM Ajin Cherian <itsa...@gmail.com> wrote:
> >
> > On Fri, Mar 5, 2021 at 9:25 PM vignesh C <vignes...@gmail.com> wrote:
> >
> >
> > Created new patch v53:
>
> Thanks for the updated patch.
> I had noticed one issue, publisher does not get stopped normally in
> the following case:
> # Publisher steps
> psql -d postgres -c "CREATE TABLE do_write(id serial primary key);"
> psql -d postgres -c "INSERT INTO do_write VALUES(generate_series(1,10));"
> psql -d postgres -c "CREATE PUBLICATION mypub FOR TABLE do_write;"
>
> # Subscriber steps
> psql -d postgres -p 9999 -c "CREATE TABLE do_write(id serial primary key);"
> psql -d postgres -p 9999 -c "INSERT INTO do_write VALUES(1);" # to
> cause a PK violation
> psql -d postgres -p 9999 -c "CREATE SUBSCRIPTION mysub CONNECTION
> 'host=localhost port=5432 dbname=postgres' PUBLICATION mypub WITH
> (two_phase = true);"
>
> # prepare & commit prepared at publisher
> psql -d postgres -c \
> "begin; insert into do_write values (100); prepare transaction 'test1';"
> psql -d postgres -c "commit prepared 'test1';"
>
> Stop publisher:
> ./pg_ctl -D publisher stop
> waiting for server to shut
> down...............................................................
> failed
> pg_ctl: server does not shut down
>
> This is because the following process does not exit:
> postgres: walsender vignesh 127.0.0.1(41550) START_REPLICATION
>
> It continuously loops at the below:
>

What happens if you don't set the two_phase option? If that also leads
to the same error then can you please also check this case on the
HEAD?

-- 
With Regards,
Amit Kapila.


Reply via email to