Fix for Slony replication issue in pgAdmin

Поиск
Список
Период
Сортировка
От Neel Patel
Тема Fix for Slony replication issue in pgAdmin
Дата
Msg-id CAMcbDBFM28RPWxZPtPq_dqGh33ux-Kktr89u2WRGXgzOwbo-Ww@mail.gmail.com
обсуждение исходный текст
Ответы Re: Fix for Slony replication issue in pgAdmin  (Dave Page <dave.page@enterprisedb.com>)
Список pgadmin-hackers
Hi Dave,

Please find the attached patch file for fix of below slony issue.

Follow the below steps after creating the set up of slony replication with cluster name "slonycluster2".

1. Open pgAdmin
2. Go to database --> Slony Replication --> "slonycluster2" --> "Replication Sets" --> "slony tables" --> "Tables"
3. Click on any one of the table
4. Error will come.

After following the above steps it shows the below error.

ERROR:  relation "public.pgbench_accounts" does not exist at character 93


Analysis:-

After going through the code in pgadmin/slony/slTable.cpp it is executing the below query to display the triggers in properties tab and in SQL Pane window and gets failed because there is no table "pgbench_account" and "pgbench_accounts" table will be crated by using the pgbench utility.


SELECT tgname AS trig_tgname FROM pg_trigger t, pg_proc p, pg_namespace n WHERE t.tgrelid = 'public.pgbench_accounts'::regclass AND t.tgfoid = p.oid AND n.nspname = '_slonycluster2'

So there should not be any dependency of pgbench utility.


To fix the issue we have changed the query as below to display the triggers in properties and SQL pane window.


SELECT tgname AS trig_tgname FROM pg_trigger t, pg_proc p, pg_namespace n WHERE t.tgfoid = p.oid AND p.pronamespace = n.oid AND n.nspname = '_slonycluster2';

Please let me know for any modification.

Thanks,
Neel Patel
Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pgAgent: C++ Port - Patch Review
Следующее
От: Linreg
Дата:
Сообщение: Re: pgAgent: C++ Port - Patch Review