Обсуждение: Postgresql iPhone

Поиск
Список
Период
Сортировка

Postgresql iPhone

От
Andrew Hoyt
Дата:
Hello, im trying to get postgresql working on iPhone.  Everything builds fine, ./configure no flags.  I have all binaries compiled, but when running initdb I get the familiar problem with "Bad System Call"


#############################################################################################################################################################################


wifininja:~ root# su -c "/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data" mobile
The files belonging to this database system will be owned by user "mobile".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... sh: line 1:   566 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   568 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=50 -c shared_buffers=500 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   570 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=40 -c shared_buffers=400 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   572 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=30 -c shared_buffers=300 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   574 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=20 -c shared_buffers=200 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   576 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=100 < "/dev/null" > "/dev/null" 2>&1
10
selecting default shared_buffers ... sh: line 1:   578 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=4096 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   580 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=3584 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   582 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=3072 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   584 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=2560 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   586 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=2048 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   588 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=1536 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   590 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   592 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=900 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   594 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=800 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   596 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=700 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   598 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=600 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   600 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=500 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   602 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=400 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   604 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=300 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   606 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=200 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   608 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=100 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   610 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=50 < "/dev/null" > "/dev/null" 2>&1
400kB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... child process was terminated by signal 12: Bad system call
initdb: removing data directory "/usr/local/pgsql/data"

#########################################################################################################################################################################

here is youtube video:

http://www.youtube.com/watch?v=XN5WTGIcgYk




Familiar errors I know, thats why I put it in the novice mailing list.  But all documentation regarding this points to Cygwin.  Would Bonjour be conflicting?  Even when I build with bonjour support it still fails like this.   I have tried all versions of postgres.  If anyone could point me in the right direction, much appreciated.  

Re: Postgresql iPhone

От
raghu ram
Дата:


On Fri, Mar 18, 2011 at 5:21 PM, Andrew Hoyt <hoytandrew540@gmail.com> wrote:
Hello, im trying to get postgresql working on iPhone.  Everything builds fine, ./configure no flags.  I have all binaries compiled, but when running initdb I get the familiar problem with "Bad System Call"


#############################################################################################################################################################################


wifininja:~ root# su -c "/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data" mobile
The files belonging to this database system will be owned by user "mobile".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... sh: line 1:   566 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   568 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=50 -c shared_buffers=500 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   570 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=40 -c shared_buffers=400 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   572 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=30 -c shared_buffers=300 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   574 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=20 -c shared_buffers=200 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   576 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=100 < "/dev/null" > "/dev/null" 2>&1
10
selecting default shared_buffers ... sh: line 1:   578 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=4096 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   580 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=3584 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   582 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=3072 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   584 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=2560 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   586 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=2048 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   588 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=1536 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   590 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   592 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=900 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   594 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=800 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   596 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=700 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   598 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=600 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   600 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=500 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   602 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=400 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   604 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=300 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   606 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=200 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   608 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=100 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   610 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=50 < "/dev/null" > "/dev/null" 2>&1
400kB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... child process was terminated by signal 12: Bad system call
initdb: removing data directory "/usr/local/pgsql/data"

#########################################################################################################################################################################

here is youtube video:

http://www.youtube.com/watch?v=XN5WTGIcgYk




Familiar errors I know, thats why I put it in the novice mailing list.  But all documentation regarding this points to Cygwin.  Would Bonjour be conflicting?  Even when I build with bonjour support it still fails like this.   I have tried all versions of postgres.  If anyone could point me in the right direction, much appreciated.  


Could you please try to set environmental variable::
 env CYWIN=server

and then connect to "postgres" user and run "initdb" binary to create a new cluster.

--Raghu Ram

env CYGWIN=server

Re: Postgresql iPhone

От
raghu ram
Дата:


On Fri, Mar 18, 2011 at 5:41 PM, raghu ram <raghuchennuru@gmail.com> wrote:


On Fri, Mar 18, 2011 at 5:21 PM, Andrew Hoyt <hoytandrew540@gmail.com> wrote:
Hello, im trying to get postgresql working on iPhone.  Everything builds fine, ./configure no flags.  I have all binaries compiled, but when running initdb I get the familiar problem with "Bad System Call"


#############################################################################################################################################################################


wifininja:~ root# su -c "/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data" mobile
The files belonging to this database system will be owned by user "mobile".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... sh: line 1:   566 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   568 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=50 -c shared_buffers=500 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   570 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=40 -c shared_buffers=400 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   572 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=30 -c shared_buffers=300 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   574 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=20 -c shared_buffers=200 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   576 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=100 < "/dev/null" > "/dev/null" 2>&1
10
selecting default shared_buffers ... sh: line 1:   578 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=4096 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   580 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=3584 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   582 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=3072 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   584 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=2560 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   586 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=2048 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   588 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=1536 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   590 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   592 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=900 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   594 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=800 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   596 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=700 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   598 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=600 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   600 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=500 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   602 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=400 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   604 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=300 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   606 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=200 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   608 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=100 < "/dev/null" > "/dev/null" 2>&1
sh: line 1:   610 Bad system call         "/usr/local/pgsql/bin/postgres" --boot -x0 -F -c max_connections=10 -c shared_buffers=50 < "/dev/null" > "/dev/null" 2>&1
400kB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... child process was terminated by signal 12: Bad system call
initdb: removing data directory "/usr/local/pgsql/data"

#########################################################################################################################################################################

here is youtube video:

http://www.youtube.com/watch?v=XN5WTGIcgYk




Familiar errors I know, thats why I put it in the novice mailing list.  But all documentation regarding this points to Cygwin.  Would Bonjour be conflicting?  Even when I build with bonjour support it still fails like this.   I have tried all versions of postgres.  If anyone could point me in the right direction, much appreciated.  


Could you please try to set environmental variable::
 env CYWIN=server

and then connect to "postgres" user and run "initdb" binary to create a new cluster.

--Raghu Ram


*Typo errors

Could you please try to set environmental variable::
 env CYGWIN=server

and then connect to "postgres" user and run "initdb" binary to create a new cluster.

--Raghu Ram
 

Re: Postgresql iPhone

От
Tom Lane
Дата:
Andrew Hoyt <hoytandrew540@gmail.com> writes:
> Hello, im trying to get postgresql working on iPhone.  Everything builds
> fine, ./configure no flags.  I have all binaries compiled, but when running
> initdb I get the familiar problem with "Bad System Call"

Umm ... it would kind of surprise me if Apple had bothered to support
SysV IPC primitives in iOS.  You'd need to find replacements for our
sysv_shmem and sysv_sema modules.  It's possible that posix_sema would
work, although I'd bet against that too.  Basically, that's likely to be
a major port effort :-(

            regards, tom lane

Re: Postgresql iPhone

От
Lukasz Brodziak
Дата:

I won't start a new thread so I'll ask here. Is there any way of compiling postgresql on Android?

18-03-2011 16:34 użytkownik "Tom Lane" <tgl@sss.pgh.pa.us> napisał:
> Andrew Hoyt <hoytandrew540@gmail.com> writes:
>> Hello, im trying to get postgresql working on iPhone. Everything builds
>> fine, ./configure no flags. I have all binaries compiled, but when running
>> initdb I get the familiar problem with "Bad System Call"
>
> Umm ... it would kind of surprise me if Apple had bothered to support
> SysV IPC primitives in iOS. You'd need to find replacements for our
> sysv_shmem and sysv_sema modules. It's possible that posix_sema would
> work, although I'd bet against that too. Basically, that's likely to be
> a major port effort :-(
>
> regards, tom lane
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice

Re: Postgresql iPhone

От
Andrej
Дата:
On 19 March 2011 23:49, Lukasz Brodziak <lukasz.brodziak@gmail.com> wrote:
> I won't start a new thread so I'll ask here. Is there any way of compiling
> postgresql on Android?
A quick google showed:

http://wiki.postgresql.org/wiki/AndroidAppContest


Does this answer your question?



Cheers,
Andrej

Re: Postgresql iPhone

От
Lew
Дата:
On 03/20/2011 05:20 PM, Andrej wrote:
> On 19 March 2011 23:49, Lukasz Brodziak<lukasz.brodziak@gmail.com>  wrote:
>> I won't start a new thread so I'll ask here. Is there any way of compiling
>> postgresql on Android?
> A quick google showed:
>
> http://wiki.postgresql.org/wiki/AndroidAppContest
>
>
> Does this answer your question?

 From that link: "PostgreSQL need not (and really should not) be run on the
phone."

I'm taking anti-schizophrenia meds now to compensate for what happened to me
when I contemplated running a database server from a phone.

Just the notion of SETI peer apps and clouds that leverage smartphone
bandwidth expands my mind beyond comfort.  "Building the supercomputer one
cellphone at a time."

--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Re: Postgresql iPhone

От
gngon
Дата:
Hi, i want to do the same thing. Do you manage to install PostgreSQL on your
iPhone. I have this error when doing make : crt_externs.h : file not found.
Could you help me? Could you give me step to manage it?
Thank you very much.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgresql-iPhone-tp3958621p5752941.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


Re: Postgresql iPhone

От
LeoTh3o
Дата:
gngon wrote
> I have this error when doing make : crt_externs.h : file not found. Could
> you help me? Could you give me step to manage it?
> Thank you very much.

That is a header that's missing in the iPhone SDK but is present in the
iPhoneSimulator one. You can also get a copy of it from your Mac OS (if you
have one) from /usr/include or try googling for it (I got this link:
http://code.ohloh.net/file?fid=cuHcSH5tP5RSe9C77vP8T1ImMCo&cid=21PxiuM5Grw&s=&browser=Default#L0
<http://code.ohloh.net/file?fid=cuHcSH5tP5RSe9C77vP8T1ImMCo&cid=21PxiuM5Grw&s=&browser=Default#L0>
and I can grant you the file is valid)



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgresql-iPhone-tp3958621p5759449.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.