In postgresql 8.2 ,how find it?
De: Richard Huxton <dev@xxxxxxxxxxxx>
Para: Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx>
Cc: pgsql-general@xxxxxxxxxxxxxx
Enviadas: Segunda-feira, 19 de Janeiro de 2009 14:36:46
Assunto: Re: How can I look at a recursive table dependency tree?
Ivan Sergio Borgonovo wrote:
> On Mon, 19 Jan 2009 14:41:12 +0000
> Richard Huxton <dev@xxxxxxxxxxxx> wrote:
>
>> Ivan Sergio Borgonovo wrote:
>>> On Mon, 19 Jan 2009 14:19:51 +0000
>>> Richard Huxton <dev@xxxxxxxxxxxx> wrote:
>>>
>>>> Igor Katson wrote:
>>>>> Is there a way to watch all dependencies recursively without
>>>>> doing a drop?
>>>> BEGIN;
>>>> DROP CASCADE...
>>>> -- check things
>>>> ROLLBACK;
>>> Isn't it going to be a pretty expensive way to see?
>
>> Not necessarily - you're not likely to have a lot of concurrency
>> on a backup database. And we are all testing this sort of stuff on
>> a backup database, aren't we?
>
> Isn't it going to be expensive even if there is no concurrency?
Not particularly. If you DELETE a lot of rows that can be expensive, but
dropping a table doesn't need to track each record individually.
> mvcc should be pretty efficient to rollback transactions but... well
> it should have a cost anyway... and you add deleting to rolling
> back, not just traversing some schema somehow.
No deletion, just removes the table (and its indexes) from catalogues
and deletes the relevant file(s) on commit.
> Surely recursively traversing a schema may be expensive in termos of
> programming time if there is no pre-build function.
Well, it shouldn't take more than an hour or so to write and test a
function. Never done so myself, since I tend to know what my schemas
look like.
--
Richard Huxton
Archonet Ltd
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
De: Richard Huxton <dev@xxxxxxxxxxxx>
Para: Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx>
Cc: pgsql-general@xxxxxxxxxxxxxx
Enviadas: Segunda-feira, 19 de Janeiro de 2009 14:36:46
Assunto: Re: How can I look at a recursive table dependency tree?
Ivan Sergio Borgonovo wrote:
> On Mon, 19 Jan 2009 14:41:12 +0000
> Richard Huxton <dev@xxxxxxxxxxxx> wrote:
>
>> Ivan Sergio Borgonovo wrote:
>>> On Mon, 19 Jan 2009 14:19:51 +0000
>>> Richard Huxton <dev@xxxxxxxxxxxx> wrote:
>>>
>>>> Igor Katson wrote:
>>>>> Is there a way to watch all dependencies recursively without
>>>>> doing a drop?
>>>> BEGIN;
>>>> DROP CASCADE...
>>>> -- check things
>>>> ROLLBACK;
>>> Isn't it going to be a pretty expensive way to see?
>
>> Not necessarily - you're not likely to have a lot of concurrency
>> on a backup database. And we are all testing this sort of stuff on
>> a backup database, aren't we?
>
> Isn't it going to be expensive even if there is no concurrency?
Not particularly. If you DELETE a lot of rows that can be expensive, but
dropping a table doesn't need to track each record individually.
> mvcc should be pretty efficient to rollback transactions but... well
> it should have a cost anyway... and you add deleting to rolling
> back, not just traversing some schema somehow.
No deletion, just removes the table (and its indexes) from catalogues
and deletes the relevant file(s) on commit.
> Surely recursively traversing a schema may be expensive in termos of
> programming time if there is no pre-build function.
Well, it shouldn't take more than an hour or so to write and test a
function. Never done so myself, since I tend to know what my schemas
look like.
--
Richard Huxton
Archonet Ltd
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes