Re: Fix for Slony replication issue in pgAdmin

From: Dave Page <dave(dot)page(at)enterprisedb(dot)com>
To: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Fix for Slony replication issue in pgAdmin
Date: 2013-09-19 13:57:50
Message-ID: CA+OCxoxaD7PKYJHsJisS9-nscCDq5zaB5zJU-d4xqmCiLx20Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, applied.

On Tue, Sep 17, 2013 at 12:38 PM, Neel Patel
<neel(dot)patel(at)enterprisedb(dot)com> wrote:
> 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

--
Dave Page
Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2013-09-19 14:00:41 pgAdmin III commit: Ensure that materialised views are available as tar
Previous Message Dave Page 2013-09-19 13:57:46 pgAdmin III commit: Fix the query used to find tables in a Slony replic