types in oracle, when I importing insert script in to postgres which is generated by ora2pg I'm getting this error "invalid memory alloc request size 1073741824"...I know we have maximum size of field in postgres is 1gb...is there any way to avoid this issue ?
Reduce the sice in Oracle. If you really need that size of data, split it into several records and put it together again in your application.
I did it in oracle, we have problem with one row so I created a new table with that one row.even that one row size is more than 1GB
Check if that data is really needed would be my first advice. And if yes, I would split it into smaller chunks than the maximum column size.
I have one doubt how can we split that particular row as it blob data I can see only binary values
Split the data stream in the application. And for binary data the default advice is to store it outside of the database and only store paths within the db.
so, in PG we store that as Bytea right? In PG, if I split it into multiple rows of binary data on insert. Then I return all of those rows, and in my application, I assemble them back as one field. Yes, this requires a change to your application. The other alternative is to store it as a file somewhere. We had to implement this very thing, for the same reason. And we had 2 rows that exceeded the limit. It was a bit of a pain. But since we knew conversion was a 2yr process for us, we decided early on, that things like this we would REDESIGN in Oracle to make the conversion to PG more seamless. (Like rewriting (+) queries to proper JOIN queries, and fixing "Quoted" DB Field Names, etc. etc.) This way, the conversion got easier/cleaner over time. Because we could stabilize the fixes in PG. And manually adjust the data for now, but still have an Automatable process for future conversion of data.
Обсуждают сегодня