memsql / datafiller

DataFiller - generate random data from database schema
https://www.cri.ensmp.fr/people/coelho/datafiller.html
GNU General Public License v3.0
33 stars 13 forks source link

Error : ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction #3

Closed pinakesh closed 5 years ago

pinakesh commented 5 years ago

Hi Team,

Please can someone help, I am getting below error while trying to insert data in a simple postgres database just to check datafiller working.

$ cat /tmp/library_new.sql

CREATE TABLE Book( bid INTEGER PRIMARY KEY, title VARCHAR NOT NULL );

CREATE TABLE Reader( rid INTEGER PRIMARY KEY, firstname VARCHAR NOT NULL, lastname VARCHAR NOT NULL, born DATE NOT NULL, gender BOOLEAN NOT NULL, phone VARCHAR );

CREATE TABLE Borrow( rid INTEGER NOT NULL REFERENCES Reader, bid INTEGER NOT NULL REFERENCES Book );

Command Ran

psql -p 5151 -c "create database library"; ./datafiller --size=10 --filter /tmp/library_new.sql |psql -p 5151 library

Output

CREATE DATABASE CREATE TABLE CREATE TABLE CREATE TABLE

filling table book (10)

ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction

filling table reader (10)

ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction

filling table borrow (10)

ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction ANALYZE ANALYZE ANALYZE

I checked logging in to the database, found only empty tables were created.

Regards, Pinakesh

pinakesh commented 5 years ago

Also tried removing several pattern (which seems to be producing the error) from the output from the output of datafiller but still error exists.

I used below query to remove the patters like '.','FREEZE ON', etc

$ psql -p 5151 -c "create database library";./datafiller -D --filter --size=10 /tmp/library_new.sql | grep -v "." | sed 's/, FREEZE ON//' | grep -v "^--" | grep -v "\echo" | psql -p 5151 library

Please suggest.

steven200796 commented 5 years ago

Hi Pinakesh, this repo was created for the purpose of using with a MemSQL database. As such, we will not be looking into this issue. For general support, please refer to the original project's website.

https://www.cri.ensmp.fr/people/coelho/datafiller.html