Replication eRServer problems

From: "John Li" <john(dot)li(at)earthlink(dot)net>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Replication eRServer problems
Date: 2004-02-16 18:16:39
Message-ID: EBECLIDIJCMMAPENHIFLAEEOCEAA.john.li@earthlink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just implemented eRServer for one of my clients and found many problems
with it.

1. It crashes when using “ers_addtable” to add big tables. The problem is
that it used pg_dump –d then tried to read the whole output in memory. I
fixed it by reading one row at a time and inserting it to slave.
2. “ers_addslave” crashes when creating table schema if one rows on the
master were dropped. Apparently, when a row was dropped, the “attname” in
“pg_attribute” table was changed to “………pg.dropped.#…………..” and the type of
the column became “-“. That made the “create table” sql statement for slave
wrong. I fixed this problem by excluding those kind of columns.
3. There was no index created on “_ers_uniq” on slave side. It took minutes
per transaction to delete on huge tables. After I found the problem and
created index on the column, it only took about 5 milliseconds to delete.
4. To handle columns with default and nextval, eRServer expected to see
nextval('"sequence_name"'::text) and used double quote to extract sequence
names. But postgres also allow nextval('sequence_name'::text) without double
quotes. The fix was easy.
5. eRServer.pm failed because DBI could not handle columns with types such
as “text[]” but Pg module should work.

Hope those will be fixed in the next version. I can also provide my fixes if
needed.

John Li

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-02-16 18:18:30 Re: [PATCHES] dollar quoting
Previous Message Tom Lane 2004-02-16 18:03:32 Re: Slow DROP INDEX