[Spacewalk-list] Could not populate database
Jan Pazdziora
jpazdziora at redhat.com
Thu Jun 24 07:56:37 UTC 2010
On Wed, Jun 23, 2010 at 05:05:19PM +0100, Nuno Dias wrote:
> Hi,
>
> I installed spacewalk from the rpm repositories, version 1.0 and after I
> run spacewalk-setup --disconnected I'm getting this error "Could not
> populate database".
>
> In the logs I have this
>
> psql:/etc/sysconfig/rhn/postgres/main.sql:6307: ERROR: syntax error at
> or near "BYTEA"
> LINE 8: primary BYTEA,
>
> This is what is in /etc/sysconfig/rhn/postgres/main.sql
> ^
> CREATE TABLE rhnPackageRepodata
> (
> package_id NUMERIC
> CONSTRAINT rhnPackageRepodata_pk PRIMARY KEY
> CONSTRAINT rhn_pkey_rd_pid_fk
> REFERENCES rhnPackage (id)
> ON DELETE CASCADE,
> primary BYTEA,
> filelist BYTEA,
> other BYTEA,
> created TIMESTAMPTZ
> DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
> modified TIMESTAMPTZ
> DEFAULT (CURRENT_TIMESTAMP) NOT NULL
> )
> ; <---- Line 6307
>
>
> Can someone give me some help?
This is caused by the fact that primary is a reserved word in
PostgreSQL:
https://www.redhat.com/archives/spacewalk-devel/2010-June/msg00029.html
Having said that -- are you sure you wanted to install the PostgreSQL
version? It is known not to work.
--
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list