Thread: Compiling a PostgreSQL 7.3.2 project with Eclipse

Compiling a PostgreSQL 7.3.2 project with Eclipse

From
Krešimir Križanović
Date:
<div class="WordSection1"><p class="MsoNormal"><span lang="EN-GB"> </span><p class="MsoNormal"><span
lang="EN-GB">               First, I want to apologize if this is a topic for one of the other mailing lists (or
completelyinappropriate for PostgreSQL mailing lists), but I looked them over, and this one seemed most
appropriate.</span><pclass="MsoNormal"><span lang="EN-GB"> </span><p class="MsoNormal"><span
lang="EN-GB">               I am working on a project based on TelegraphCQ 2.1 Data Stream Management System which is
inturn based on PostgreSQL 7.3.2. I’ve decided to use Eclipse. I have managed to import source into Eclipse and to run
it,using instructions given here: <a
href="http://wiki.postgresql.org/wiki/Working_with_Eclipse">http://wiki.postgresql.org/wiki/Working_with_Eclipse</a>.</span><p
class="MsoNormal"><spanlang="EN-GB"> </span><p class="MsoNormal"><span lang="EN-GB">                However, where I
compileand run the project, in the Eclipse console I get:</span><p class="MsoNormal"><span lang="EN-GB"> </span><p
class="MsoNormal"style="text-autospace:none"><span lang="EN-GB">                </span><span lang="EN-GB"
style="font-size:10.0pt;font-family:Monospace;color:black">POSTGRESbackend interactive interface </span><span
lang="EN-GB"style="font-size:10.0pt;font-family:Monospace"></span><p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB"style="font-size:10.0pt;font-family:Monospace;color:black">$Revision: 1.115 $ $Date: 2006/02/06 01:19:46
$</span><pclass="MsoNormal" style="text-indent:35.4pt"><span lang="EN-GB"
style="font-size:10.0pt;font-family:Monospace;color:black"> </span><pclass="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB"style="font-size:10.0pt;font-family:Monospace;color:black">I don’t know what to do with this backend
interface.I would like to get a postmaster running and to connect to a data base with psql. However, when i try to
startpsql, it says that there is no postmaster running.</span><p class="MsoNormal" style="text-indent:35.4pt"><span
lang="EN-GB"style="font-size:10.0pt;font-family:Monospace;color:black"> </span><p class="MsoNormal"
style="text-indent:35.4pt"><spanlang="EN-GB" style="font-size:10.0pt;font-family:Monospace;color:black">Can someone
pleasegive me a hand,</span><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-GB"
style="font-size:10.0pt;font-family:Monospace;color:black">K.K.</span></div>

Re: Compiling a PostgreSQL 7.3.2 project with Eclipse

From
Christopher Browne
Date:
2011/5/6 Krešimir Križanović <Kresimir.Krizanovic@fer.hr>:
> I don't know what to do with this backend interface. I would like to get a
> postmaster running and to connect to a data base with psql. However, when i
> try to start psql, it says that there is no postmaster running.

I would not assume that it is handled the same way as with PostgreSQL,
as it's a "fork" that has quite distinct implementation and behaviour.

Does the TelegraphCQ documentation not include some documentation as
to how to start up the backend?

Answering that, it surely does:
http://telegraph.cs.berkeley.edu/telegraphcq/v0.2/gettingstarted.html
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"


Re: Compiling a PostgreSQL 7.3.2 project with Eclipse

From
Greg Smith
Date:
Krešimir Križanović wrote:
>
>
> However, where I compile and run the project, in the Eclipse console I 
> get:
>
> POSTGRES backend interactive interface
>
> $Revision: 1.115 $ $Date: 2006/02/06 01:19:46 $
>
> I don’t know what to do with this backend interface. I would like to 
> get a postmaster running and to connect to a data base with psql. 
> However, when i try to start psql, it says that there is no postmaster 
> running.
>

An example of a session with that interface is at 
http://archives.postgresql.org/pgsql-hackers/2000-01/msg01471.php ; you 
may find it useful at some point.

Your problem is caused by a change made to PostgreSQL's naming 
convention made after the 7.3 fork you're using. In earlier versions, 
"postgres" meant start the server in single user mode: 
http://www.postgresql.org/docs/7.3/static/app-postgres.html

While "postmaster" started it as a proper server: 
http://www.postgresql.org/docs/7.3/static/app-postmaster.html

In modern versions, they are the same thing. The Eclipse example uses 
"postgres", which starts the regular server now, but in 7.3 only started 
single user mode. Change where you run the program to use "postmaster" 
instead and it should work more like what you're expecting.

Doing something useful with the TelegraphCQ code is probably going to 
take you a while.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us




Re: Compiling a PostgreSQL 7.3.2 project with Eclipse

From
Krešimir Križanović
Date:
Thanks for the help, that is the problem I think. However, I didn’t manage to test it yet. When I compile the project
inEclipse, I get postgres executable, but not the postmaster. I found somewhere on the net that postmaster and postgres
areactually the same program, and when Install TelegraphCQ2.1 through shell, i get a postmaster, which is a link to a
file.(since my linux knowledge rather poor, I didn’t manage yet to find out which file, but I strongly suspect
postgres).
Do you maybe have an idea how to make that link, or how to start postgres as a daemon?
Sorry for the bother, again.
Concerning TelegraphCQ, my aim is to add geospatial capabilities, to actually merge it with PostGIS. Its a part of my
PhDThesis.
 
Thanks,K.K.

-----Original Message-----
From: Greg Smith [mailto:greg@2ndquadrant.com] 
Sent: Friday, May 06, 2011 8:32 PM
To: Krešimir Križanović
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Compiling a PostgreSQL 7.3.2 project with Eclipse

Krešimir Križanović wrote:
>
>
> However, where I compile and run the project, in the Eclipse console I 
> get:
>
> POSTGRES backend interactive interface
>
> $Revision: 1.115 $ $Date: 2006/02/06 01:19:46 $
>
> I don’t know what to do with this backend interface. I would like to 
> get a postmaster running and to connect to a data base with psql. 
> However, when i try to start psql, it says that there is no postmaster 
> running.
>

An example of a session with that interface is at 
http://archives.postgresql.org/pgsql-hackers/2000-01/msg01471.php ; you 
may find it useful at some point.

Your problem is caused by a change made to PostgreSQL's naming 
convention made after the 7.3 fork you're using. In earlier versions, 
"postgres" meant start the server in single user mode: 
http://www.postgresql.org/docs/7.3/static/app-postgres.html

While "postmaster" started it as a proper server: 
http://www.postgresql.org/docs/7.3/static/app-postmaster.html

In modern versions, they are the same thing. The Eclipse example uses 
"postgres", which starts the regular server now, but in 7.3 only started 
single user mode. Change where you run the program to use "postmaster" 
instead and it should work more like what you're expecting.

Doing something useful with the TelegraphCQ code is probably going to 
take you a while.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us



Re: Compiling a PostgreSQL 7.3.2 project with Eclipse

From
Josh Berkus
Date:
Kresimir,

>     Concerning TelegraphCQ, my aim is to add geospatial capabilities, to actually merge it with PostGIS. Its a part
ofmy PhD Thesis.
 

Hmmm.  Given that the TCQ code was never production quality in the first
place (i.e. crashed every 60 minutes), this seems like kind of a futile
task.  Especially since nothing you develop against 7.3 is going to be
accepted into either PostgreSQL or PostGIS.

Seems like updating the TCQ code would be more useful.  Although not as
exciting.  Too bad Truviso is closed source.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com