pg11b1 from outside a txn: "VACUUM cannot run inside a transaction block": should be: ...or multi-command string

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg11b1 from outside a txn: "VACUUM cannot run inside a transaction block": should be: ...or multi-command string
Date: 2018-06-23 21:06:37
Message-ID: 20180623210637.GI30453@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

in pg10:

ts=# begin;VACUUM FULL pg_toast.pg_toast_2619;
BEGIN
ERROR: 25001: VACUUM cannot run inside a transaction block
LOCATION: PreventTransactionChain, xact.c:3167
=> sounds fine

$ psql postgres -c 'SELECT 1; VACUUM pg_statistic'
ERROR: VACUUM cannot be executed from a function or multi-command string
=> sounds fine

In pg11b1:

pryzbyj=# begin;VACUUM FULL pg_toast.pg_toast_2619;
BEGIN
ERROR: 25001: VACUUM cannot run inside a transaction block
LOCATION: PreventInTransactionBlock, xact.c:3163
=> sounds fine

[pryzbyj(at)dev ~]$ psql -c 'SELECT 1; VACUUM pg_statistic'
ERROR: VACUUM cannot run inside a transaction block
=> Error message seems off??

I couldn't figure out how to \set VERBOSITY verbose inside a psql command (??),
but strace shows for v10:
SERROR\0VERROR\0C25001\0MVACUUM cannot be executed from a function or multi-command string\0Fxact.c\0L3187\0RPreventTransactionChain

And for v11:
SERROR\0VERROR\0C25001\0MVACUUM cannot run inside a transaction block\0Fxact.c\0L3163\0RPreventInTransactionBlock

Function renamed by commit 04700b685f31508036456bea4d92533e5ceee9d6.

So behavior change maybe caused by 6eb52da3948dc8bc7c8a61cbacac14823b670c58 ?

Justin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Charles Cui 2018-06-23 23:54:58 [GSoC] array processing questions
Previous Message Bruce Momjian 2018-06-23 20:36:00 Re: Does logical replication supports cross platform servers?