Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pgsql and MAXALIGN
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Fri Jul 26, 2013 5:39 pm    Post subject: pgsql and MAXALIGN Reply with quote

not really sure where this should go but I have a pgsql "data" dir from a mac I'm trying to get working on my amd64 linux. I compiled the pgsql version that "data" came from and when I try to start it I get a fatal err:

The database cluster was initialized with MAXALIGN 0, but the server was compiled with MAXALIGN 8.

not being able to find much on that I tried recompiling w/CC="gcc -m32 --target=i386 ..." to see what would happen and got this next:

... but the server was compiled with MAXALIGN 4.

presumably a "MAXALIGN 0" means it was unset when the mac bins were built, maybe because mac arch doesn't support MAXALIGN or something? is there a way around this such that I can build the linux pgsql bins to get a MAXALIGN 0 too?

when I check compile env I see these so could changing to something else be what I need to do? if so what would I change them too? or do they not matter?

HOSTTYPE=x86_64-linux
MACHTYPE=x86_64

thanks.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Jul 26, 2013 6:28 pm    Post subject: Reply with quote

Quote:
... I have a pgsql "data" dir from a mac I'm trying to get working on my amd64 linux. ...


Unless you are an advanced PostgreSQL expert familiar with internal data structures,
you shouldn't even think about transferring data between different systems by copying
the "data" dir. It's dangerous, it won't work, you will run into all kind of troubles,
and - most importantly - it's not a valid use case and not supported by the developers.

The proper way to transfer data from a Mac to a Linux system is to make a PostgreSQL
dump on the Mac using pg_dump or pg_dumpall and to import that dump on the
Linux server.
Back to top
View user's profile Send private message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Fri Jul 26, 2013 9:41 pm    Post subject: Reply with quote

thanks but tbh all I'm interested in is what I posted about, whether or not I can do anything about MAXALIGN when compiling. what is/is not supported isn't a concern although of course I'd be interested to know that one has first-hand knowledge going from mac to another platform is functionally impossible.

if I can get it running in order to dump text data from a table for a customer that's what I'm after. I've never had probs I can't deal with when moving/recovering "data" between win machines, this is the first time I've tried to do so for a mac (intel mac if it matters).
Back to top
View user's profile Send private message
titanofold
Developer
Developer


Joined: 30 Dec 2003
Posts: 235
Location: Bryson City, NC USA

PostPosted: Tue Jul 30, 2013 2:48 am    Post subject: Reply with quote

No, you can't adjust MAXALIGN. It's particular to the OS and system.

The best process is a dump and restore.
_________________
The best things in life are free.
Guy-1: Surely, you will fold with me...
Guy-2: Alright, but don't call me Shirley
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum