From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | Vishnu R <Vishnu_R(at)sifycorp(dot)com> |
Cc: | Anders Hermansen <anders(at)yoyo(dot)no>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: list of sequences |
Date: | 2003-04-03 02:50:00 |
Message-ID: | 1049338199.1107.297.camel@inspiron.cramers |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I would think that using a replicator which reads the logs would work
better. How are you going to deal with serialization ? Also you need to
worry about changes made manually in the db?
Regarding the serialization you could have two processes which both
attempt to execute select * from foo from update simultaneously. The
server will serialize these properly, your code may not.
Dave
On Wed, 2003-04-02 at 17:20, Vishnu R wrote:
> Thanks a lot Anders.
> Another query - i am sure someone has used this before. I want to try
> out replication by creating my own class which implements Statement and
> whenever an execute/executeUpdate is called, pass on the sql using TCP
> to another application running on a different server which will execute
> the sql on the slave DB.
> I do understand that this replication using java would not be very good
> in terms of performance. But i am not really sure i want to turn on
> pgReplicator on my production DB.
>
>
> Is there anything else i should worry about?
>
> regards
> vishnu
> Anders Hermansen wrote:
>
> >* Vishnu R (Vishnu_R(at)sifycorp(dot)com) wrote:
> >
> >>Is there any nice way of getting a list of sequences from a db using jdbc?
> >>
> >
> >Retreive the MetaData with:
> >connection.getMetaData();
> >
> >The DatabaseMetaData object has a method getTables, check out the
> >javadoc:
> >http://java.sun.com/j2se/1.4.1/docs/api/java/sql/DatabaseMetaData.html
> >
> >When you set the types parameter to SEQUENCE you will get sequences.
> >
> >
> >Hope this helps,
> >Anders
> >
> >--
> >Anders Hermansen
> >YoYo Mobile as
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 3: if posting/reading through Usenet, please send an appropriate
> >subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> >message can get through to the mailing list cleanly
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Dave Cramer <Dave(at)micro-automation(dot)net>
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Shraibman | 2003-04-03 04:05:58 | SQLException : Unknown Response Type |
Previous Message | Ryan Wexler | 2003-04-02 22:33:51 | Re: prepared statements and sequences |