Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> Here is a report regarding the backend-crash from a user in Japan.
> Included shell script should reproduce the phenomenon.
On which postgres version(s)?
> Note that
> select * from getting; vacuum;
> does cause a crash, while
> select * from getting;
Specifically I see you are using
> psql -c "select * from getting; vacuum;" $DBNAME
rather than entering the commands at the psql prompt. The -c option
works differently from entering multiple commands at psql's prompt.
In ordinary interactive use, psql will break what you type at
semicolon boundaries and send each SQL command to the backend
separately, even if you typed several commands on one line.
*But* the -c option doesn't work that way --- it just sends the
whole given string to the backend as one query.
The implication of this is that psql -c "select * from getting; vacuum;"
executes the select and the vacuum as part of a single transaction,
whereas any other way of doing it with psql will make the commands be
two separate transactions. I speculate that this has something to do
with the different behavior you see.
Exactly what the bug is is beyond my abilities, but perhaps that tidbit
will help someone more competent to find it.
regards, tom lane
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 1998-10-02 06:16:08|
|Subject: Re: [HACKERS] functional indexes|
|Previous:||From: Bruce Momjian||Date: 1998-10-02 06:02:48|
|Subject: Re: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)|