pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRenaming a DB
8+ messages / 4 participants
[nested] [flat]
* Renaming a DB
@ 2003-07-05 08:42 Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Mendola Gaetano @ 2003-07-05 08:42 UTC (permalink / raw)
To: pgsql-admin
Hi all,
I'm running a Postgres 7.3.3 and I had the necessity to
rename a DB, I did this by updating the pg_database
table.
If I perform psql -l I'm able to see that is reported the
correct name ( I guess because a select on pg_database
table is performed ) but if I try to connect to the DB
after the renaming I obtain the error:
psql: FATAL: Database "new_name" does not exist in
the system catalog.
however trying after a while ( without do nothing ) I'm
able to connect to "new_name" database, is like the names
of database are cached somewhere and this cache expire
after a while.
Any idea ?
Regards
Gaetano Mendola
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
@ 2003-07-06 01:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-07-06 02:30 ` Re: Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-21 03:58 ` Re: Renaming a DB Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 2 replies; 8+ messages in thread
From: Tom Lane @ 2003-07-06 01:36 UTC (permalink / raw)
To: Mendola Gaetano <mendola@bigfoot.com>; +Cc: pgsql-admin
"Mendola Gaetano" <mendola@bigfoot.com> writes:
> I'm running a Postgres 7.3.3 and I had the necessity to
> rename a DB, I did this by updating the pg_database
> table.
> If I perform psql -l I'm able to see that is reported the
> correct name ( I guess because a select on pg_database
> table is performed ) but if I try to connect to the DB
> after the renaming I obtain the error:
> psql: FATAL: Database "new_name" does not exist in
> the system catalog.
Try vacuuming pg_database (you can do this from any database,
it need not be the one that is having the problem).
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-07-06 02:30 ` Mendola Gaetano <mendola@bigfoot.com>
2003-07-07 09:20 ` Re: Renaming a DB JEANARTHUR@EUROVOX.FR
1 sibling, 1 reply; 8+ messages in thread
From: Mendola Gaetano @ 2003-07-06 02:30 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
"Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> "Mendola Gaetano" <mendola@bigfoot.com> writes:
> > I'm running a Postgres 7.3.3 and I had the necessity to
> > rename a DB, I did this by updating the pg_database
> > table.
> > If I perform psql -l I'm able to see that is reported the
> > correct name ( I guess because a select on pg_database
> > table is performed ) but if I try to connect to the DB
> > after the renaming I obtain the error:
> > psql: FATAL: Database "new_name" does not exist in
> > the system catalog.
>
> Try vacuuming pg_database (you can do this from any database,
> it need not be the one that is having the problem).
A normal vacuum was not enough I did a vacuum full and seems
working.
Thank you
Gaetano Mendola
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
2003-07-06 02:30 ` Re: Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
@ 2003-07-07 09:20 ` JEANARTHUR@EUROVOX.FR
2003-07-07 12:17 ` Re: Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
0 siblings, 1 reply; 8+ messages in thread
From: JEANARTHUR@EUROVOX.FR @ 2003-07-07 09:20 UTC (permalink / raw)
To: pgsql-admin
Hi,
I have in my logs the following lines :
jui 7 10:40:07 poseidon logger: FATAL: Non-superuser connection
limit exceeded
jui 7 10:40:44 poseidon logger: LOG: pq_recvbuf: unexpected EOF
on client connection
jui 7 10:40:53 poseidon last message repeated 23 times
What does it means ? Particulary the "pg_recvbuf" line ?
when this happen, DB is very very very slow and I have to restart it...
Version is 7.3.2 on a dual 2Ghz Xenon with 1go RAM, SCSI RAID 1
drives, Red Hat 8.0
Buffers are set to -B90846
Num of postgres is -N255
And sort meme is -S131072
There are a lot of updates and select on this DB.
Numbers of transaction/sec is approx. 60.
We do a vacuum -v -a -z every 12 hours
and a full vacuum each week.
Thanks for your help !
Jean-Arthur Silve
EuroVox
4, Place Félix Eboué
75583 Paris Cedex 12
T : +33 1 44670505
F : +33 1 44670519
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
2003-07-06 02:30 ` Re: Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-07 09:20 ` Re: Renaming a DB JEANARTHUR@EUROVOX.FR
@ 2003-07-07 12:17 ` Mendola Gaetano <mendola@bigfoot.com>
0 siblings, 0 replies; 8+ messages in thread
From: Mendola Gaetano @ 2003-07-07 12:17 UTC (permalink / raw)
To: JEANARTHUR@EUROVOX.FR; pgsql-admin
<JEANARTHUR@EUROVOX.FR> wrote:
> Hi,
>
> I have in my logs the following lines :
>
> jui 7 10:40:07 poseidon logger: FATAL: Non-superuser connection
> limit exceeded
> jui 7 10:40:44 poseidon logger: LOG: pq_recvbuf: unexpected EOF
> on client connection
> jui 7 10:40:53 poseidon last message repeated 23 times
I think is time to increase your max_connections settings.
Regards
Gaetano Mendola
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-07-21 03:58 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-07-21 04:09 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 8+ messages in thread
From: Bruce Momjian @ 2003-07-21 03:58 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Mendola Gaetano <mendola@bigfoot.com>; pgsql-admin
Tom Lane wrote:
> "Mendola Gaetano" <mendola@bigfoot.com> writes:
> > I'm running a Postgres 7.3.3 and I had the necessity to
> > rename a DB, I did this by updating the pg_database
> > table.
> > If I perform psql -l I'm able to see that is reported the
> > correct name ( I guess because a select on pg_database
> > table is performed ) but if I try to connect to the DB
> > after the renaming I obtain the error:
> > psql: FATAL: Database "new_name" does not exist in
> > the system catalog.
>
> Try vacuuming pg_database (you can do this from any database,
> it need not be the one that is having the problem).
Tom, why was a VACUUM FULL required?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
2003-07-21 03:58 ` Re: Renaming a DB Bruce Momjian <pgman@candle.pha.pa.us>
@ 2003-07-21 04:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-07-21 04:20 ` Re: Renaming a DB Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2003-07-21 04:09 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Mendola Gaetano <mendola@bigfoot.com>; pgsql-admin
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom, why was a VACUUM FULL required?
I doubt that it was; a VACUUM would have sufficed to fix the tuple
commit bits. What I forgot to recommend was a CHECKPOINT to make
sure the fixed pages got dumped to disk. (Until they're written
out to the kernel, a new backend would still see the old pages
when it's doing the GetRawDatabaseInfo cruft.)
I think a VAC FULL would have flushed dirty pages, but a plain VACUUM
wouldn't, so VAC FULL is a second way of getting the result.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Renaming a DB
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
2003-07-21 03:58 ` Re: Renaming a DB Bruce Momjian <pgman@candle.pha.pa.us>
2003-07-21 04:09 ` Re: Renaming a DB Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-07-21 04:20 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2003-07-21 04:20 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Mendola Gaetano <mendola@bigfoot.com>; pgsql-admin
Oh, I forgot that the backends are reading the raw disk files to find
database names. Thanks.
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom, why was a VACUUM FULL required?
>
> I doubt that it was; a VACUUM would have sufficed to fix the tuple
> commit bits. What I forgot to recommend was a CHECKPOINT to make
> sure the fixed pages got dumped to disk. (Until they're written
> out to the kernel, a new backend would still see the old pages
> when it's doing the GetRawDatabaseInfo cruft.)
>
> I think a VAC FULL would have flushed dirty pages, but a plain VACUUM
> wouldn't, so VAC FULL is a second way of getting the result.
>
> regards, tom lane
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2003-07-21 04:20 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-05 08:42 Renaming a DB Mendola Gaetano <mendola@bigfoot.com>
2003-07-06 01:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-07-06 02:30 ` Mendola Gaetano <mendola@bigfoot.com>
2003-07-07 09:20 ` JEANARTHUR@EUROVOX.FR
2003-07-07 12:17 ` Mendola Gaetano <mendola@bigfoot.com>
2003-07-21 03:58 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-07-21 04:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-07-21 04:20 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox