Fix for Slony replication issue in pgAdmin - Mailing list pgadmin-hackers

From Neel Patel
Subject Fix for Slony replication issue in pgAdmin
Date
Msg-id CAMcbDBFM28RPWxZPtPq_dqGh33ux-Kktr89u2WRGXgzOwbo-Ww@mail.gmail.com
Whole thread Raw
Responses Re: Fix for Slony replication issue in pgAdmin
List 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
Attachment

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: pgAgent: C++ Port - Patch Review
Next
From: Linreg
Date:
Subject: Re: pgAgent: C++ Port - Patch Review