Re: pg_get_domaindef

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)alcove(dot)com(dot)au>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, FAST PostgreSQL <fastpgs(at)fast(dot)fujitsu(dot)com(dot)au>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: pg_get_domaindef
Date: 2007-01-25 07:06:26
Message-ID: 15495.1169708786@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Gavin Sherry <swm(at)alcove(dot)com(dot)au> writes:
> I was talking to AndrewSN on irc about this. He proposed that we supply
> two versions (yes I hear the collective groan) of the SQL functions: a
> fast one (SnapshotNow) and an accurate one (which doesn't use
> SnapshotNow).

Um, that's such a fundamental misconception that it's got to be nipped
in the bud. The reason the backend tends to operate on SnapshotNow is
that it can't afford to be working with obsolete schema data. As an
example, you'd certainly not be happy if your updates to a table
disappeared into nowhere because your backend was working against a
snapshot that said table X was in tablespace Y, when meanwhile someone
had committed a transaction that moved it to tablespace Z. On the other
hand, pg_dump is entirely not about applying updates; it would like to
have a consistent read-only snapshot as of a time that might be many
hours ago by the time it's done. Both viewpoints are "accurate" for
their respective purposes; neither is chosen because it is "fast".

We might indeed need two sets of functions, but if you categorize them
like that you'll never get it right.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Drake 2007-01-25 07:15:20 Re: [HACKERS] unprivileged contrib and pl install
Previous Message Tom Lane 2007-01-25 06:52:32 Re: pgsql: Fix for plpython functions; return true/false for boolean,

Browse pgsql-patches by date

  From Date Subject
Next Message Jeremy Drake 2007-01-25 07:15:20 Re: [HACKERS] unprivileged contrib and pl install
Previous Message Tom Lane 2007-01-25 06:52:32 Re: pgsql: Fix for plpython functions; return true/false for boolean,