SHOW with libpq

Started by Limin Liualmost 25 years ago6 messagesgeneral
Jump to latest
#1Limin Liu
limin@pumpkinnet.com

Does anyone know how to access the result of SHOW from PGresult?

For example, in a C progam using libpq

PGconn* conn = ...;
PGresult *res;

res = PGexec(conn, "SHOW DataStyle");

What should I do next?

Thank you very much

--
LM Liu

#2Igor
dbmanager@osb368.nnov.ru
In reply to: Limin Liu (#1)
Vacuudb problem

Hi,

Help me please to resolve my problem. It is during vacuuming
database .I resolved it last time in such a way: pg_dump and
psql -e db<db.archiv. But after some days it appeared again.
Here is messages :

NOTICE: mdopen: couldn't open pg_temp.2297.4: No such file or directory
NOTICE: RelationIdBuildRelation: smgropen(pg_temp.2297.4): No such file or directory
NOTICE: mdopen: couldn't open pg_temp.2297.4: No such file or directory
ERROR: cannot open relation pg_temp.2297.4
vacuumdb: vacuum failed

And one more question. Is there any way to encrease speed
of restoring database . psql -e works about some hours for me...

Thanks for any suggestions.

Igor

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Igor (#2)
Re: Vacuudb problem

Igor <dbmanager@osb368.nnov.ru> writes:

Help me please to resolve my problem.

Postgres version?

regards, tom lane

#4Igor
dbmanager@osb368.nnov.ru
In reply to: Tom Lane (#3)
Re[2]: Vacuudb problem

Sorry, I clean forgot to tell ....
I'm running PG v7.02.

Help me please to resolve my problem.

TL> Postgres version?

#5Bruce Momjian
bruce@momjian.us
In reply to: Igor (#2)
Re: Vacuudb problem

What release are you running? My guess is that an upgrade will fix it.

Hi,

Help me please to resolve my problem. It is during vacuuming
database .I resolved it last time in such a way: pg_dump and
psql -e db<db.archiv. But after some days it appeared again.
Here is messages :

NOTICE: mdopen: couldn't open pg_temp.2297.4: No such file or directory
NOTICE: RelationIdBuildRelation: smgropen(pg_temp.2297.4): No such file or directory
NOTICE: mdopen: couldn't open pg_temp.2297.4: No such file or directory
ERROR: cannot open relation pg_temp.2297.4
vacuumdb: vacuum failed

And one more question. Is there any way to encrease speed
of restoring database . psql -e works about some hours for me...

Thanks for any suggestions.

Igor

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Igor (#4)
Re: Re[2]: Vacuudb problem

Igor <dbmanager@osb368.nnov.ru> writes:

Sorry, I clean forgot to tell ....
I'm running PG v7.02.

Ah. Update to 7.0.3 (or even better 7.1, but 7.0.3 is a drop-in
replacement with no need for dump/reload). I think you are getting
bit by a known bug in 7.0.2: if the client disconnects partway through
a transaction, the backend forgets to clean up before it exits. That's
probably why you have these partially-removed temp tables laying about.

regards, tom lane