Thread: using slony with pgadmin
I need to replicate a database using slony that has tables created in it from pgadmin. I've hit a snag because slony requires that all replicated tables have a primary key, and the pgadmin tables dont have one. Basically I am wondering if anyone has replicated pgadmin tables with slony, or barring that if anyone has any suggestions on how I should go about adding primary keys to the pgadmin tables so as not to break anything. Thanks in advance. -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
On Sun, 5 Dec 2004 02:35:57 -0500, Robert Treat <xzilla@users.sourceforge.net> wrote: > I need to replicate a database using slony that has tables created in it from > pgadmin. I've hit a snag because slony requires that all replicated tables > have a primary key, and the pgadmin tables dont have one. Pgadmin is entirely capable of putting primary keys on tables created with it. Simply use the constraints tab in the new table or table properties dialog. -- -- Cheetah
Robert Treat wrote: > I need to replicate a database using slony that has tables created in it from > pgadmin. I've hit a snag because slony requires that all replicated tables > have a primary key, and the pgadmin tables dont have one. I wonder what you mean by "pgadmin tables". pgAdmin III doesn't use or create any pgadmin specific tables, are you talking about pgAdmin II? FYI: In pgAdmin III V1.3/1.4, we plan to add some mechanism to encourage users to *always* add a PK. Regards, Andreas
Robert Treat wrote: > Hmm... I guess these must be pgadmin II tables? Honestly I am not sure, the > client uses both pgadmin II and III, so I thought that's where they were > coming from. Here is the schema I'm talking about: > > live=# \d pga_* > Table "public.pga_forms" > Table "public.pga_layout" > Table "public.pga_queries" > Table "public.pga_reports" > Table "public.pga_schema" > Table "public.pga_scripts" Clearly pgaII. Replication probably not necessary. Regards, Andreas
-----Original Message----- From: pgadmin-support-owner@postgresql.org on behalf of Andreas Pflug Sent: Tue 12/7/2004 5:45 PM To: Robert Treat Cc: pgadmin-support@postgresql.org Subject: Re: [pgadmin-support] using slony with pgadmin Robert Treat wrote: >> Hmm... I guess these must be pgadmin II tables? Honestly I am not sure, the >> client uses both pgadmin II and III, so I thought that's where they were >> coming from. Here is the schema I'm talking about: >> >> live=# \d pga_* >> Table "public.pga_forms" >> Table "public.pga_layout" >> Table "public.pga_queries" >> Table "public.pga_reports" >> Table "public.pga_schema" >> Table "public.pga_scripts" > Clearly pgaII. Replication probably not necessary. Not pgadmin 1, 2 or 3 - maybe pgAccess? Regards, Dave
On Tuesday 07 December 2004 04:18, Andreas Pflug wrote: > Robert Treat wrote: > > I need to replicate a database using slony that has tables created in it > > from pgadmin. I've hit a snag because slony requires that all replicated > > tables have a primary key, and the pgadmin tables dont have one. > > I wonder what you mean by "pgadmin tables". pgAdmin III doesn't use or > create any pgadmin specific tables, are you talking about pgAdmin II? > > FYI: In pgAdmin III V1.3/1.4, we plan to add some mechanism to encourage > users to *always* add a PK. > Hmm... I guess these must be pgadmin II tables? Honestly I am not sure, the client uses both pgadmin II and III, so I thought that's where they were coming from. Here is the schema I'm talking about: live=# \d pga_* Table "public.pga_forms" Column | Type | Modifiers ------------+-----------------------+-----------formname | character varying(64) | formsource | text | Table "public.pga_layout" Column | Type | Modifiers -----------+-----------------------+-----------tablename | character varying(64) | nrcols | smallint | colnames | text | colwidth | text | Table "public.pga_queries" Column | Type | Modifiers ---------------+-----------------------+-----------queryname | character varying(64) | querytype | character(1) | querycommand | text | querytables | text | querylinks | text | queryresults | text | querycomments | text | Table "public.pga_reports" Column | Type | Modifiers ---------------+-----------------------+-----------reportname | character varying(64) | reportsource | text | reportbody | text | reportprocs | text | reportoptions | text | Table "public.pga_schema" Column | Type | Modifiers --------------+-----------------------+-----------schemaname | character varying(64) | schematables | text | schemalinks | text | Table "public.pga_scripts" Column | Type | Modifiers --------------+-----------------------+-----------scriptname | character varying(64) | scriptsource | text | -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
On Tuesday 07 December 2004 12:45, Andreas Pflug wrote: > Robert Treat wrote: > > Hmm... I guess these must be pgadmin II tables? Honestly I am not sure, > > the client uses both pgadmin II and III, so I thought that's where they > > were coming from. Here is the schema I'm talking about: > > > > live=# \d pga_* > > Table "public.pga_forms" > > Table "public.pga_layout" > > Table "public.pga_queries" > > Table "public.pga_reports" > > Table "public.pga_schema" > > Table "public.pga_scripts" > > Clearly pgaII. Replication probably not necessary. > Hmm... the theory here is that in the event of failover, the client doesn't want to lose all of thier reports and what not that they have in pgadmin. Let me ask you this, would it break anything to add a serial key to each of the tables? -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL