On 2016-12-20 09:43, Petr Jelinek wrote:

Thanks, this was very useful. We had wrong attribute index arithmetics
in the place where we verify that replica identities match well enough.

Well, I spent a lot of time on the whole thing so I am glad it's not just
something stupid I did :)

BTW that script you have for testing has 2 minor flaws in terms of
pgbench_history - the order by is not unique enough (adding mtime or
something helps)

yes, in another version I did
  ALTER TABLE pgbench_history ADD COLUMN hid SERIAL PRIMARY KEY.
I suppose that's the best way (adding mtime doesn't work; apparently mtime gets repeated too). (I have now added that alter table-statement again.)

and second, the pgbench actually truncates the
pgbench_history unless -n is added to command line.

ok, -n  added.

So attached is v15, which fixes this and the
ERROR:  unexpected command tag "PUBLICATION
as reported by Steve Singer (plus tab completion fixes and doc fixes).

Great. It seems to fix the problem: I just an an unprecidented
5-minute run with correct replication.

The first compile gave the attached diffs in the publication regression test; subsequent compiles went OK (2x). If I have time later today I'll try to reproduce that one FAILED test
but maybe you can see  immediately what's wrong there .

thanks,

Erik Rijkers



*** /home/aardvark/pg_stuff/pg_sandbox/pgsql.logical_replication/src/test/regress/expected/publication.out	2016-12-20 09:53:28.023321098 +0100
--- /home/aardvark/pg_stuff/pg_sandbox/pgsql.logical_replication/src/test/regress/results/publication.out	2016-12-20 09:59:32.380705797 +0100
***************
*** 79,86 ****
  ---------+---------+---------
   t       | t       | t
  Tables:
-     "public.testpub_tbl1"
      "pub_test.testpub_nopk"
  
  -- fail - view
  ALTER PUBLICATION testpub_default ADD TABLE testpub_view;
--- 79,86 ----
  ---------+---------+---------
   t       | t       | t
  Tables:
      "pub_test.testpub_nopk"
+     "public.testpub_tbl1"
  
  -- fail - view
  ALTER PUBLICATION testpub_default ADD TABLE testpub_view;
***************
*** 120,127 ****
  ---------+---------+---------
   t       | t       | t
  Tables:
-     "public.testpub_tbl1"
      "pub_test.testpub_nopk"
  
  ALTER PUBLICATION testpub_default DROP TABLE testpub_tbl1, pub_test.testpub_nopk;
  -- fail - nonexistent
--- 120,127 ----
  ---------+---------+---------
   t       | t       | t
  Tables:
      "pub_test.testpub_nopk"
+     "public.testpub_tbl1"
  
  ALTER PUBLICATION testpub_default DROP TABLE testpub_tbl1, pub_test.testpub_nopk;
  -- fail - nonexistent

======================================================================

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to