Re: Should clients warn in case of server version mismatch ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com>
Cc: "Adam Radlowski" <adamr(at)informatyka(dot)gdansk(dot)pl>, "Lista Postgres" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Should clients warn in case of server version mismatch ?
Date: 2006-12-08 15:16:53
Message-ID: 5037.1165591013@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com> writes:
> IMHO for major version mismatch psql should not present the
> user with a prompt at all as certain commands are most likely
> not work.

The analogy you're drawing with pg_dump is faulty. There are at least
three good reasons for psql to be more forgiving of version mismatches
than pg_dump is:

1. pg_dump is commonly run noninteractively (eg, from a cron job) where
any mere warning will likely go unnoticed. So it has to raise a hard
error to get the DBA's attention. psql's backslash commands are far
less likely to be used noninteractively, and a failure is usually pretty
obvious to a human user.

2. pg_dump is critical: if it dumps an unusable backup due to not
understanding the system catalogs of a newer server, the DBA who needs
that backup later will be badly screwed. psql's backslash commands,
again, are not so critical.

3. psql offers a pretty decent amount of functionality even if some of
its backslash commands don't work, whereas a dump that is wrong is worse
than useless. So the use-case for operating with a version mismatch is
much wider for psql.

So I think we have the right tradeoffs in this regard now.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-12-08 15:23:25 Re: Statement logging for a particular database
Previous Message Oleg Bartunov 2006-12-08 14:57:38 Re: tsearch2 problem rank_cd() (possibly) crashing postgres