Thread: SHOW with libpq

SHOW with libpq

From
Limin Liu
Date:
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



Vacuudb problem

From
Igor
Date:
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



Re: Vacuudb problem

From
Tom Lane
Date:
Igor <dbmanager@osb368.nnov.ru> writes:
> Help me please to resolve my problem.

Postgres version?

            regards, tom lane

Re[2]: Vacuudb problem

From
Igor
Date:
Sorry, I clean forgot to tell ....
I'm running PG v7.02.

>> Help me please to resolve my problem.

TL> Postgres version?



Re: Vacuudb problem

From
Bruce Momjian
Date:
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

Re: Re[2]: Vacuudb problem

From
Tom Lane
Date:
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