I just recently switched from MySQL to PostgreSQL for a database that is on my local machine. I export the entire database to another machine (laptop) when I do on-site research where I don't have access to Internet. Previously, I had used the binary log to update changes to the primary version of the database, and I was attempting to use PostgreSQL's mod log as a substitute for binary log. I was successful with queries I entered using PgAdmin directly; however, for queries where I used a frontend (Wavemaker) to process, the log is showing the statement in two columns, such as:
execute <unnamed>: insert into schema.table (col1, col2, col3) values ($1,$2,$3)
parameters: $1 = 'value1', $2 = 'value2', $3 = 'value3'
OR:
execute <unnamed>: delete from schema.table where key=$1
parameters: $1 = 'keyvalue'
I checked out information concerning PREPARE in PostgreSQL; however, it looks like I would have to define the data types to do this (which the CSV report does not list).
Is there any way to convert the log contents as to make the query readable for PostgreSQL to process in the above cases?
Thank you for any help any of you can provide.
pg_start_backup()
on the master, rsync the datadir from master to slave,pg_stop_backup()
, copy the last WAL and start the slave. – Craig Ringer Sep 19 '12 at 12:26