Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFF5Y-0005nR-DF for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jun 2023 14:27:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qFF5X-0001ng-9Q for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jun 2023 14:27:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFF5W-0001nX-T7 for pgsql-hackers@lists.postgresql.org; Fri, 30 Jun 2023 14:27:07 +0000 Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qFF5S-001NIA-5r for pgsql-hackers@lists.postgresql.org; Fri, 30 Jun 2023 14:27:06 +0000 Received: from [192.168.1.115] (dsl-hkibng22-54f8db-125.dhcp.inet.fi [84.248.219.125]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4QsyLp3cwtzydC; Fri, 30 Jun 2023 17:26:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1688135219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yG/zvgrE4lH3q0C6L5v9ClUoMD0OYYBGSwgfiNggAds=; b=vrs5D7yhXiam65eeApWR9kbf/T16tDTl3flvPcTHumnoEUEgGo6gr+J1WJ6wQKfwtwT9Y9 5McNk24ZqP6M68GbuQk+XqcFVfUQNY0fimiZAUajYOO5lHScjaEW/fCfjnyPD91fCfTW6e TjbE5gMyz8fTMO+LmkpXRJ8famX8oMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1688135219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yG/zvgrE4lH3q0C6L5v9ClUoMD0OYYBGSwgfiNggAds=; b=FLfyE/Sd8+/hhzQzLAgjFVKHZwEnzgdNtb5eIU+YNbxT1HABe0yRCq887X1RiHq7Re9WRo 8rnLEIeGtqZKQRov//tEHp/lwc+Q61eZHdXTDS9QG5xJSGIzcMGVSrvkbyUyPQMqzYjpgL iZbEtQbWbnlZCRIdILR+ImjIqTVrayI= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1688135219; a=rsa-sha256; cv=none; b=AZ1HR8YG0SOhE6rOKjH/yKv83x5haFl2txrp9/iu9l6awi8XXZd7WTz9h5tec3BAaYhVTC UFMczREVaBtQcM5ByKtDbnSgE3TX/+4cA9b0kH6yXob5hhAbyuGV2c0MB47umQmClbXk/N NNkakMbxG9E6QBymUUQkrvt6xP9gp40= Message-ID: Date: Fri, 30 Jun 2023 17:26:57 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: SPI isolation changes Content-Language: en-US To: Seino Yuki , pgsql-hackers@lists.postgresql.org References: <295eeac9054979182770bdf9d72d28d3@oss.nttdata.com> From: Heikki Linnakangas In-Reply-To: <295eeac9054979182770bdf9d72d28d3@oss.nttdata.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 30/06/2023 17:15, Seino Yuki wrote: > Hi, > > When I read the documents and coding of SPI, [1] > I found that the following the SPI_start_transaction does not support > transaciton_mode(ISOLATION LEVEL, READ WRITE/READ ONLY) like BEGIN > command. [2] > Is there a reason for this? Per the documentation for SPI_start_transaction that you linked to: "SPI_start_transaction does nothing, and exists only for code compatibility with earlier PostgreSQL releases." I haven't tested it, but perhaps you can do "SET TRANSACTION ISOLATION LEVEL" in the new transaction after calling SPI_commit() though. Or "SET DEFAULT TRANSACTION ISOLATION LEVEL" before committing. -- Heikki Linnakangas Neon (https://neon.tech)