Thread: 'Weird' errors

'Weird' errors

From
Martin Gainty
Date:
experiencing weird 14001 errors .no logs not evt nothing to go by so i completely rebuilt the cygwin postgres

ran cygwin
then i ran the initdb as follows

$ ./postgresql-8.4.1/src/bin/initdb/initdb.exe -D /pgsql/data
The files belonging to this database system will be owned by user "postgres".
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 /pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... sh: line 1:  2752 Bad system call
"/cygdrive/c/Postgres/postgresql-8.4.1/src/bin/initdb/postgres.exe" --boot -x0 -
F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1

<snip>these Bad System calls go on for pages ...</snip>

400kB
creating configuration files ... ok
creating template1 database in /pgsql/data/base/1 ... child process was terminated by signal 12
initdb: removing data directory "/pgsql/data"

#########so lets try just one system call at command line and determine where the error is########
postgres@desktop
/cygdrive/c/Postgres$ /cygdrive/c/Postgres/postgresql-8.4.1/src/bin/initdb/postgres.exe --boot -x0-F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1

no error

???????why does initdb choke on these system calls but cygwin command line works fine?????????

Postgres version>postgresql-8.4.1
$ cygcheck -V
cygcheck version 1.90.4.1
System Checker for Cygwin
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
Compiled on Jun 12 2008

apologies in advance for posting to wrong list
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.





Hotmail: Free, trusted and rich email service. Get it now.

Re: 'Weird' errors

From
Richard Huxton
Date:
Martin Gainty wrote:
> experiencing weird 14001 errors .no logs not evt nothing to go by so i completely rebuilt the cygwin postgres
>
> ran cygwin
> then i ran the initdb as follows
>
> $ ./postgresql-8.4.1/src/bin/initdb/initdb.exe -D /pgsql/data
> The files belonging to this database system will be owned by user "postgres".
> 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 /pgsql/data ... ok
> creating subdirectories ... ok
> selecting default max_connections ... sh: line 1:  2752 Bad system call
> "/cygdrive/c/Postgres/postgresql-8.4.1/src/bin/initdb/postgres.exe" --boot -x0 -
> F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1

Googling "cygwin bad system call" gets me this:
  http://people.maths.ox.ac.uk/~nichol/cruftscraper/cygwinenv.shtml

The  CYGWIN environment variable
...
(no)server - if set, allows client applications to use the Cygserver
facilities. This option must be enabled explicitely on the client side,
otherwise your applications won't be able to use the XSI IPC function
calls (msgget, semget, shmget, and friends) successfully. These function
calls will return with ENOSYS, "Bad system call".

Looks like this environment setting differs in the two environments.

--
  Richard Huxton
  Archonet Ltd

Re: 'Weird' errors

From
Martin Gainty
Date:
thanks for the prompt response
i took the stack of bad calls and placed them in a .sh and they all ran flawlessly..
there is a delta in there somewhere

I have a followup (if i may)
I am able to get past the initdb  but when i run the postgres on the data folder I get no postgresql.conf found specifically
postgres cannot access the server configuration file "/cygdrive/c/Postgres/pgsql/data/postgresql.conf'

is there a foolproof way that I will allow postgres to access postgresql.conf?

thanks!
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.





> Date: Thu, 17 Sep 2009 19:35:30 +0100
> From: dev@archonet.com
> To: mgainty@hotmail.com
> CC: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] 'Weird' errors
>
> Martin Gainty wrote:
> > experiencing weird 14001 errors .no logs not evt nothing to go by so i completely rebuilt the cygwin postgres
> >
> > ran cygwin
> > then i ran the initdb as follows
> >
> > $ ./postgresql-8.4.1/src/bin/initdb/initdb.exe -D /pgsql/data
> > The files belonging to this database system will be owned by user "postgres".
> > 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 /pgsql/data ... ok
> > creating subdirectories ... ok
> > selecting default max_connections ... sh: line 1: 2752 Bad system call
> > "/cygdrive/c/Postgres/postgresql-8.4.1/src/bin/initdb/postgres.exe" --boot -x0 -
> > F -c max_connections=100 -c shared_buffers=1000 < "/dev/null" > "/dev/null" 2>&1
>
> Googling "cygwin bad system call" gets me this:
> http://people.maths.ox.ac.uk/~nichol/cruftscraper/cygwinenv.shtml
>
> The CYGWIN environment variable
> ...
> (no)server - if set, allows client applications to use the Cygserver
> facilities. This option must be enabled explicitely on the client side,
> otherwise your applications won't be able to use the XSI IPC function
> calls (msgget, semget, shmget, and friends) successfully. These function
> calls will return with ENOSYS, "Bad system call".
>
> Looks like this environment setting differs in the two environments.
>
> --
> Richard Huxton
> Archonet Ltd
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.

Re: 'Weird' errors

From
Richard Huxton
Date:
Martin Gainty wrote:
> thanks for the prompt response
> i took the stack of bad calls and placed them in a .sh and they all ran flawlessly..
> there is a delta in there somewhere
>
> I have a followup (if i may)
> I am able to get past the initdb  but when i run the postgres on the data folder I get no postgresql.conf found
specifically
> postgres cannot access the server configuration file "/cygdrive/c/Postgres/pgsql/data/postgresql.conf'
>
> is there a foolproof way that I will allow postgres to access postgresql.conf?

Is there some permissions problem? Is that what you mean by "cannot access"?

--
  Richard Huxton
  Archonet Ltd

Re: 'Weird' errors

From
Martin Gainty
Date:
yes
i flipped to my regular account and re-created the db with initdb -D newFolder
i have noticed that initdb basically deletes everything ..and the reason for doing that would be?
initdb -D dataDir --noclean
allows initdb to retain the data folder and postgresql.conf configuration file contents

thanks,
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.





> Date: Thu, 17 Sep 2009 20:57:04 +0100
> From: dev@archonet.com
> To: mgainty@hotmail.com
> CC: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] 'Weird' errors
>
> Martin Gainty wrote:
> > thanks for the prompt response
> > i took the stack of bad calls and placed them in a .sh and they all ran flawlessly..
> > there is a delta in there somewhere
> >
> > I have a followup (if i may)
> > I am able to get past the initdb but when i run the postgres on the data folder I get no postgresql.conf found specifically
> > postgres cannot access the server configuration file "/cygdrive/c/Postgres/pgsql/data/postgresql.conf'
> >
> > is there a foolproof way that I will allow postgres to access postgresql.conf?
>
> Is there some permissions problem? Is that what you mean by "cannot access"?
>
> --
> Richard Huxton
> Archonet Ltd
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.

Re: 'Weird' errors

From
Tom Lane
Date:
Martin Gainty <mgainty@hotmail.com> writes:
> i flipped to my regular account and re-created the db with initdb -D newFolder
> i have noticed that initdb basically deletes everything ..and the reason for doing that would be?

Oh?  It should refuse to do anything if the target directory is not
empty; and does act that way, in my testing.

            regards, tom lane

Re: 'Weird' errors

From
Martin Gainty
Date:
i was able to get it sorted out with the latest release these initdb and pg_ctl commands as follows
initdb --pgdata=/pgsql/data

#####postgresql.conf contents consist of
# this is a comment

#what port to run on
port = 5432

#hostname or address on which the postmaster is to listen for connections from client applications
#virtual_host = 'localhost'

#prints a line informing about each successful connection to the server log
log_connections = true

#prefixes each server log message with a timestamp
#log_timestamp = true
#determines how many concurrent connections the database server will allow
max_connections = 3
#######end postresql.conf

######### START pg_hba.conf
# Allow any user on the local system to connect to any database under
# any database user name using Unix-domain sockets (the default for local
# connections).
#
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         all                               trust
#####END pg_hba.conf

############start PG VERSION
8.4
############END PG_VERSION file

$ /cygdrive/c/postgres/pgsql/bin/pg_ctl -D "/pgsql/data" -l logfile start

server starting

thanks tom
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.





> To: mgainty@hotmail.com
> CC: dev@archonet.com; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] 'Weird' errors
> Date: Thu, 17 Sep 2009 17:25:07 -0400
> From: tgl@sss.pgh.pa.us
>
> Martin Gainty <mgainty@hotmail.com> writes:
> > i flipped to my regular account and re-created the db with initdb -D newFolder
> > i have noticed that initdb basically deletes everything ..and the reason for doing that would be?
>
> Oh? It should refuse to do anything if the target directory is not
> empty; and does act that way, in my testing.
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


Hotmail: Free, trusted and rich email service. Get it now.