Deutsch English Français Italiano |
<vbnoio$2i1cc$6@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.python Subject: Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited) Date: Mon, 9 Sep 2024 21:16:09 -0000 (UTC) Organization: A noiseless patient Spider Lines: 20 Message-ID: <vbnoio$2i1cc$6@dont-email.me> References: <Ztx1sZMGTnA3eLP1@hermes.hilbert.loc> <7cb50df2-9c76-477f-91c9-e149c7637104@aklaver.com> <ZtytJMhyvtExPxfF@hermes.hilbert.loc> <5ee80b84-f04b-454d-ab39-45572e0751a1@aklaver.com> <Zty7ZCMwKQl4C4Id@hermes.hilbert.loc> <4a1b12fc-24b7-4c7e-b1f2-6ec9c5f341c2@aklaver.com> <ZtzDubguRDWXwV-t@hermes.hilbert.loc> <mailman.46.1725744071.2917.python-list@python.org> <lk4ajkFbbnrU1@mid.individual.net> <slrnvdr13p.4dt.jon+usenet@raven.unequivocal.eu> <vbl2ig$222n3$2@dont-email.me> <slrnvdtf24.4dt.jon+usenet@raven.unequivocal.eu> <vbmge5$2c7jr$1@dont-email.me> <slrnvdthpa.4dt.jon+usenet@raven.unequivocal.eu> <vbnnuu$2i1cc$1@dont-email.me> <slrnvdup6j.4dt.jon+usenet@raven.unequivocal.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 09 Sep 2024 23:16:09 +0200 (CEST) Injection-Info: dont-email.me; posting-host="48619980776be9ad3edbc43d1fdbfd55"; logging-data="2688396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nGnKeQoUIxCGfsQJFwGI2" User-Agent: Pan/0.160 (Toresk; ) Cancel-Lock: sha1:JGP+1dIhV52N/P1FUAnABTe8tnc= Bytes: 2367 On Mon, 9 Sep 2024 21:12:51 -0000 (UTC), Jon Ribbens wrote: > On 2024-09-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote: >> >> On Mon, 9 Sep 2024 10:00:11 -0000 (UTC), Jon Ribbens wrote: >>> >>> On 2024-09-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote: >>>> >>>> The database only needs to commit when it is explicitly told. >>>> Anything less -- no commit. >>> >>> So the Python code is half-way through a transaction when it throws a >>> (non-database-related) exception and that thread of execution is >>> aborted. The database connection returns to the pool ... >> >> The DBMS connection is deleted. > > How does that happen then? You write code to do it.