[rt-users] migrating from MySQL to Postgres?
ktm at rice.edu
ktm at rice.edu
Wed Jun 29 08:58:16 EDT 2011
On Tue, Jun 28, 2011 at 05:40:21PM -0500, Dario Landazuri wrote:
> Greetings,
>
> Some progress has been made on this front. I have made some slight
> edits to Edward Groenendaal's script found here:
> http://wiki-archive.bestpractical.com/view/MySQLToPg that Ruslan
> pointed out. I am now able to migrate data from my mysql database
> to a postgres one. I'll post that script tomorrow.
>
> RT comes up ok with the postgres database, but I am unable to create
> new tickets - the following error comes up in
> /var/log/httpd/error_log:
>
> [Tue Jun 28 17:31:56 2011] [error] [client 128.83.129.176] FastCGI:
> server "/opt/rt/rt4/sbin/rt-server.fcgi" stderr: [Tue Jun 28
> 22:31:56 2011] [crit]: Couldn't create a ticket: Internal Error:
> Couldn't execute the query 'INSERT INTO Tickets (Subject, Status,
> Queue, Creator, Owner, LastUpdatedBy, Started, Type, Resolved,
> Starts, Created, Priority, LastUpdated, Due) VALUES (?, ?, ?, ?, ?,
> ?, ?, ?, ?, ?, ?, ?, ?, ?)'ERROR: duplicate key value violates
> unique constraint "tickets_pkey", referer: https://<rt
> instance>/Ticket/Create.html?Queue=3
>
> Any ideas? I have moved back to the mysql-backed instance for the
> time being.
>
> Thanks,
> Dario
>
> --
> ************************************************************
> Dario Landazuri dario at astro.as.utexas.edu
> Systems Administrator (512) 471-3334
> McDonald Observatory
> ************************************************************
>
Hi Dario,
I think you need to make certain you set the start points of the
serial columns/sequences for the PostgreSQL version to after the
last value for each PK. Then you will get a new/unique value
for each insert thereafter.
Cheers,
Ken
More information about the rt-users
mailing list