From cjwhite@cisco.com Thu Apr 3 16:35:38 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 37194474E4F; Thu, 3 Apr 2003 11:35:38 -0500 (EST) Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by postgresql.org (Postfix) with ESMTP id 5456D474E44; Thu, 3 Apr 2003 11:35:37 -0500 (EST) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-1.cisco.com (8.12.6/8.12.6) with ESMTP id h33GZemr018855; Thu, 3 Apr 2003 08:35:40 -0800 (PST) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.2.1-GA) with ESMTP id ACW89133; Thu, 3 Apr 2003 08:35:39 -0800 (PST) Reply-To: From: "Chris White" To: , Subject: Problems with Large Objects using Postgres 7.2.1 Date: Thu, 3 Apr 2003 08:35:36 -0800 Message-ID: <000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C2F9BC.017B2250" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-1.5 required=5.0 tests=BAYES_20,HTML_20_30 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/38 X-Sequence-Number: 8193 This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C2F9BC.017B2250 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I have a Java application which writes large objects to the database using the JDBC interface. The application reads binary input from an input stream and writes large objects to the database in 8K chunks and calculates the length of the data. At the end of the input stream it closes the large object and commits the large object and then updates associated tables with the large object id and large object length and commits that info to the database. The application has multiple threads (max 8) simultaneously writing these large objects each using their own connection. Whenever the system has a problem we have a monitor application which detects a need for a system shutdown and shuts down Postgres using a smart shutdown. What I am seeing is that when all 8 threads are running and the system is shutdown, large objects committed in transactions near to the shutdown are corrupt when the database is restarted. I know the large objects are committed, because the associated entries in the tables which point to the large objects are present after the restart with valid information about the large object length and oid. However when I access the large objects I am only returned a 2K chunk even though the table entry tells me the entry should be 320K. Anybody have any ideas what is the problem? Are there any know issues with the recovery of large objects? Chris White ------=_NextPart_000_0010_01C2F9BC.017B2250 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have a = Java=20 application which writes large objects to the database using the JDBC inter= face.=20 The application reads binary input from an input stream and writes lar= ge=20 objects to the database in 8K chunks and calculates the length of the data.= At=20 the end of the input stream it closes the large object and commit= s the=20 large object and then updates associated tables with the large object id an= d=20 large object length and commits that info to the database. The application = has=20 multiple threads (max 8)  simultaneously writing these large obje= cts=20 each using their own connection. Whenever the system has a problem we have = a=20 monitor application which detects a need for a system shutdown and shuts do= wn=20 Postgres using a smart shutdown.
 
What I am= seeing is=20 that when all 8 threads are running and the system is shutdown, large= =20 objects committed in transactions near to the shutdown are corrupt when the= =20 database is restarted. I know the large objects are committed, because the= =20 associated entries in the tables which point to the large objects are prese= nt=20 after the restart with valid information about the large object length and = oid.=20 However when I access the large objects I am only returned a 2K chunk even= =20 though the table entry tells me the entry should be 320K.
 
Anybody h= ave any=20 ideas what is the problem? Are there any know issues with the recovery of l= arge=20 objects?
 
Chris=20 White
------=_NextPart_000_0010_01C2F9BC.017B2250-- From cjwhite@cisco.com Wed Apr 9 16:25:39 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5BF85476352; Wed, 9 Apr 2003 12:25:39 -0400 (EDT) Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by postgresql.org (Postfix) with ESMTP id A96B8476342; Wed, 9 Apr 2003 12:25:36 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-1.cisco.com (8.12.6/8.12.6) with ESMTP id h39GPbmk022940; Wed, 9 Apr 2003 09:25:40 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB46422; Wed, 9 Apr 2003 09:25:37 -0700 (PDT) Reply-To: From: "Chris White" To: , Subject: Re: Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 09:25:35 -0700 Message-ID: <010c01c2feb4$a6ebe100$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_010D_01C2FE79.FA8D0900" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-7.3 required=5.0 tests=BAYES_10,HTML_20_30,HTML_FONT_COLOR_BLUE,IN_REP_TO autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/147 X-Sequence-Number: 8302 This is a multi-part message in MIME format. ------=_NextPart_000_010D_01C2FE79.FA8D0900 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Never saw any responses to this. Anybody have any ideas? -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Chris White Sent: Thursday, April 03, 2003 8:36 AM To: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: [ADMIN] Problems with Large Objects using Postgres 7.2.1 I have a Java application which writes large objects to the database using the JDBC interface. The application reads binary input from an input stream and writes large objects to the database in 8K chunks and calculates the length of the data. At the end of the input stream it closes the large object and commits the large object and then updates associated tables with the large object id and large object length and commits that info to the database. The application has multiple threads (max 8) simultaneously writing these large objects each using their own connection. Whenever the system has a problem we have a monitor application which detects a need for a system shutdown and shuts down Postgres using a smart shutdown. What I am seeing is that when all 8 threads are running and the system is shutdown, large objects committed in transactions near to the shutdown are corrupt when the database is restarted. I know the large objects are committed, because the associated entries in the tables which point to the large objects are present after the restart with valid information about the large object length and oid. However when I access the large objects I am only returned a 2K chunk even though the table entry tells me the entry should be 320K. Anybody have any ideas what is the problem? Are there any know issues with the recovery of large objects? Chris White ------=_NextPart_000_010D_01C2FE79.FA8D0900 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Never=20 saw any responses to this. Anybody have any ideas?
-----Original Message-----
From:=20 pgsql-admin-owner@postgresql.org=20 [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Chris=20 White
Sent: Thursday, April 03, 2003 8:36 AM
To:=20 pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org
Subject:= =20 [ADMIN] Problems with Large Objects using Postgres 7.2.1

I have = a Java=20 application which writes large objects to the database using the JDBC=20 interface. The application reads binary input from an input stream a= nd=20 writes large objects to the database in 8K chunks and calculates the leng= th of=20 the data. At the end of the input stream it closes the large ob= ject=20 and commits the large object and then updates associated tables with the = large=20 object id and large object length and commits that info to the database. = The=20 application has multiple threads (max 8)  simultaneously writin= g=20 these large objects each using their own connection. Whenever the system = has a=20 problem we have a monitor application which detects a need for a system= =20 shutdown and shuts down Postgres using a smart shutdown.
 
What I = am seeing=20 is that when all 8 threads are running and the system is shutdown, l= arge=20 objects committed in transactions near to the shutdown are corrupt when t= he=20 database is restarted. I know the large objects are committed, because th= e=20 associated entries in the tables which point to the large objects are pre= sent=20 after the restart with valid information about the large object length an= d=20 oid. However when I access the large objects I am only returned a 2K chun= k=20 even though the table entry tells me the entry should be=20 320K.
 
Anybody= have any=20 ideas what is the problem? Are there any know issues with the recovery of= =20 large objects?
 
Chris= =20 White
------=_NextPart_000_010D_01C2FE79.FA8D0900-- From tgl@sss.pgh.pa.us Wed Apr 9 16:51:06 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 56F2C475A8D; Wed, 9 Apr 2003 12:51:06 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 6739A474E44; Wed, 9 Apr 2003 12:51:02 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39Gp22L008264; Wed, 9 Apr 2003 12:51:02 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: Problems with Large Objects using Postgres 7.2.1 In-reply-to: <010c01c2feb4$a6ebe100$ff926b80@amer.cisco.com> References: <010c01c2feb4$a6ebe100$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 09:25:35 -0700" Date: Wed, 09 Apr 2003 12:51:01 -0400 Message-ID: <8263.1049907061@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/149 X-Sequence-Number: 8304 "Chris White" writes: > What I am seeing is that when all 8 threads are running and the system is > shutdown, large objects committed in transactions near to the shutdown are > corrupt when the database is restarted. I know the large objects are > committed, because the associated entries in the tables which point to the > large objects are present after the restart with valid information about the > large object length and oid. However when I access the large objects I am > only returned a 2K chunk even though the table entry tells me the entry > should be 320K. Hmm. Have you tried looking directly into pg_largeobject to see what row(s) are present for the particular LO ID? Is the data that's there valid? > Anybody have any ideas what is the problem? Are there any know issues with > the recovery of large objects? No, news to me. I would suggest that you should be running 7.2.4, not 7.2.1; we don't make dot-releases just to keep busy. But offhand I don't know of any recent reports of symptoms like this. regards, tom lane From cjwhite@cisco.com Wed Apr 9 17:04:14 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 76263476302; Wed, 9 Apr 2003 13:04:14 -0400 (EDT) Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by postgresql.org (Postfix) with ESMTP id A24894762F6; Wed, 9 Apr 2003 13:04:13 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-2.cisco.com (8.12.6/8.12.6) with ESMTP id h39H4AgE006113; Wed, 9 Apr 2003 10:04:11 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB50664; Wed, 9 Apr 2003 10:04:10 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 10:04:09 -0700 Message-ID: <012a01c2feba$09ccbce0$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <8263.1049907061@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-31.5 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,ORIGINAL_MESSAGE, QUOTED_EMAIL_TEXT,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/150 X-Sequence-Number: 8305 Tom, I didn't looked at the data in the table. However, when I did a lo_export of one of the objects I only got a 2K file output. Next time this happens I will look at the table data. Chris -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Tom Lane Sent: Wednesday, April 09, 2003 9:51 AM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Problems with Large Objects using Postgres 7.2.1 "Chris White" writes: > What I am seeing is that when all 8 threads are running and the system is > shutdown, large objects committed in transactions near to the shutdown are > corrupt when the database is restarted. I know the large objects are > committed, because the associated entries in the tables which point to the > large objects are present after the restart with valid information about the > large object length and oid. However when I access the large objects I am > only returned a 2K chunk even though the table entry tells me the entry > should be 320K. Hmm. Have you tried looking directly into pg_largeobject to see what row(s) are present for the particular LO ID? Is the data that's there valid? > Anybody have any ideas what is the problem? Are there any know issues with > the recovery of large objects? No, news to me. I would suggest that you should be running 7.2.4, not 7.2.1; we don't make dot-releases just to keep busy. But offhand I don't know of any recent reports of symptoms like this. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org From tgl@sss.pgh.pa.us Wed Apr 9 17:28:43 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 55083475458; Wed, 9 Apr 2003 13:28:43 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 7E0CA474E44; Wed, 9 Apr 2003 13:28:42 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39HSL2L008673; Wed, 9 Apr 2003 13:28:21 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <012a01c2feba$09ccbce0$ff926b80@amer.cisco.com> References: <012a01c2feba$09ccbce0$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 10:04:09 -0700" Date: Wed, 09 Apr 2003 13:28:21 -0400 Message-ID: <8672.1049909301@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.1 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/152 X-Sequence-Number: 8307 "Chris White" writes: > I didn't looked at the data in the table. However, when I did a lo_export of > one of the objects I only got a 2K file output. IIRC, we store 2K per row in pg_largeobject. So this is consistent with the idea that row 0 is present for the LO ID, while row 1 is not. What I'm wondering is if the other hundred-odd rows that would be needed to hold a 300K large object are there or not. Also, do the rows contain the appropriate data for their parts of the overall large object? regards, tom lane From cjwhite@cisco.com Wed Apr 9 18:59:17 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ECAC0475CEE; Wed, 9 Apr 2003 14:59:17 -0400 (EDT) Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by postgresql.org (Postfix) with ESMTP id D502C475458; Wed, 9 Apr 2003 14:59:14 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-1.cisco.com (8.12.6/8.12.6) with ESMTP id h39IxDmi008984; Wed, 9 Apr 2003 11:59:13 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB65996; Wed, 9 Apr 2003 11:59:09 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 11:59:08 -0700 Message-ID: <012f01c2feca$1a3ab860$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <8672.1049909301@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-21.8 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,ORIGINAL_MESSAGE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/158 X-Sequence-Number: 8313 Looking at our code further, the actual code writes the large object commits it, opens the large object updates the header of the large object (first 58 bytes) with some length info using seeks, then writes and commits the object again, before updating and committing the associated tables. The data I saw in the exported file was the header info without the updates for the length info i.e. after the first commit!! Chris -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Wednesday, April 09, 2003 10:28 AM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 "Chris White" writes: > I didn't looked at the data in the table. However, when I did a lo_export of > one of the objects I only got a 2K file output. IIRC, we store 2K per row in pg_largeobject. So this is consistent with the idea that row 0 is present for the LO ID, while row 1 is not. What I'm wondering is if the other hundred-odd rows that would be needed to hold a 300K large object are there or not. Also, do the rows contain the appropriate data for their parts of the overall large object? regards, tom lane From tgl@sss.pgh.pa.us Wed Apr 9 19:20:18 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 643DF4762F6; Wed, 9 Apr 2003 15:20:18 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 2DF6E4762D7; Wed, 9 Apr 2003 15:20:17 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39JKE2L009429; Wed, 9 Apr 2003 15:20:14 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <012f01c2feca$1a3ab860$ff926b80@amer.cisco.com> References: <012f01c2feca$1a3ab860$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 11:59:08 -0700" Date: Wed, 09 Apr 2003 15:20:13 -0400 Message-ID: <9428.1049916013@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/159 X-Sequence-Number: 8314 "Chris White" writes: > Looking at our code further, the actual code writes the large object commits > it, opens the large object updates the header of the large object (first 58 > bytes) with some length info using seeks, then writes and commits the object > again, before updating and committing the associated tables. The data I saw > in the exported file was the header info without the updates for the length > info i.e. after the first commit!! Oh, that's interesting. I wonder whether you could be running into some variant of this issue: http://archives.postgresql.org/pgsql-hackers/2002-05/msg00875.php I looked a little bit at fixing this, but wasn't sure how to get the appropriate snapshot passed to the LO functions --- the global QuerySnapshot might not be the right thing, but then what is? Also, what if a transaction opens multiple LO handles for the same object --- should they be able to see each others' updates? (I'm not sure we could prevent it, so this may be moot.) BTW what do you mean exactly by "commit" above? There is no notion of committing a large object separately from committing a transaction. regards, tom lane From cjwhite@cisco.com Wed Apr 9 20:23:06 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 68383476237; Wed, 9 Apr 2003 16:23:06 -0400 (EDT) Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by postgresql.org (Postfix) with ESMTP id 5BB054761BC; Wed, 9 Apr 2003 16:23:05 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-5.cisco.com (8.12.6/8.12.6) with ESMTP id h39KMhGO017924; Wed, 9 Apr 2003 13:22:55 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB74829; Wed, 9 Apr 2003 13:22:43 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 13:22:42 -0700 Message-ID: <013101c2fed5$c6b8e390$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <9428.1049916013@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-18.5 required=5.0 tests=BAYES_10,IN_REP_TO,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/162 X-Sequence-Number: 8317 See inline ***CJW*** -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Tom Lane Sent: Wednesday, April 09, 2003 12:20 PM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 >"Chris White" writes: >> Looking at our code further, the actual code writes the large object commits >> it, opens the large object updates the header of the large object (first 58 >> bytes) with some length info using seeks, then writes and commits the object >> again, before updating and committing the associated tables. The data I saw >> in the exported file was the header info without the updates for the length >> info i.e. after the first commit!! > >Oh, that's interesting. I wonder whether you could be running into some >variant of this issue: >http://archives.postgresql.org/pgsql-hackers/2002-05/msg00875.php > >I looked a little bit at fixing this, but wasn't sure how to get the >appropriate snapshot passed to the LO functions --- the global >QuerySnapshot might not be the right thing, but then what is? Also, >what if a transaction opens multiple LO handles for the same object >--- should they be able to see each others' updates? (I'm not sure >we could prevent it, so this may be moot.) ***CJW*** Nobody can knows about these large objects until the associated table with large object info is committed to the database, which is after the header info has been updated. So nobody will be reading them while they are being updated. The problem seems to be after the restart of the database after a smart shutdown, when we are having issues with reading the large objects. ***CJW*** >BTW what do you mean exactly by "commit" above? There is no notion of >committing a large object separately from committing a transaction. ***CJW*** I meant committing the transaction. The first transaction commit is after the large object is written and closed. Second is after the large object update and close. Then the third is after the associated tables are updated. ***CJW*** > regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html From tgl@sss.pgh.pa.us Wed Apr 9 21:18:32 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 06F16475458; Wed, 9 Apr 2003 17:18:32 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 44B51474E42; Wed, 9 Apr 2003 17:18:31 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39LIV2L010039; Wed, 9 Apr 2003 17:18:31 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <013101c2fed5$c6b8e390$ff926b80@amer.cisco.com> References: <013101c2fed5$c6b8e390$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 13:22:42 -0700" Date: Wed, 09 Apr 2003 17:18:31 -0400 Message-ID: <10038.1049923111@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/163 X-Sequence-Number: 8318 "Chris White" writes: >> BTW what do you mean exactly by "commit" above? There is no notion of >> committing a large object separately from committing a transaction. > I meant committing the transaction. The first transaction commit is after > the large object is written and closed. Second is after the large object > update and close. Then the third is after the associated tables are updated. Hmm. So the state you are seeing corresponds to the commit of the first transaction, as far as the LO itself goes --- that's perfectly reasonable. But I don't see how it could be that the third transaction appears committed while the second does not. Are you issuing all these transactions over the same database connection? Perhaps the second transaction isn't really committed? regards, tom lane From cjwhite@cisco.com Wed Apr 9 21:26:08 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B3E5A475458; Wed, 9 Apr 2003 17:26:08 -0400 (EDT) Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by postgresql.org (Postfix) with ESMTP id 945D2474E42; Wed, 9 Apr 2003 17:26:07 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-5.cisco.com (8.12.6/8.12.6) with ESMTP id h39LPnGQ013553; Wed, 9 Apr 2003 14:26:00 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB82157; Wed, 9 Apr 2003 14:25:49 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 14:25:48 -0700 Message-ID: <013401c2fede$9754ff40$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <10038.1049923111@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-31.5 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,ORIGINAL_MESSAGE, QUOTED_EMAIL_TEXT,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/164 X-Sequence-Number: 8319 The first and second are over the same connection. The third is over a different connection, but issued after the second transaction has completed. -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Tom Lane Sent: Wednesday, April 09, 2003 2:19 PM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 "Chris White" writes: >> BTW what do you mean exactly by "commit" above? There is no notion of >> committing a large object separately from committing a transaction. > I meant committing the transaction. The first transaction commit is after > the large object is written and closed. Second is after the large object > update and close. Then the third is after the associated tables are updated. Hmm. So the state you are seeing corresponds to the commit of the first transaction, as far as the LO itself goes --- that's perfectly reasonable. But I don't see how it could be that the third transaction appears committed while the second does not. Are you issuing all these transactions over the same database connection? Perhaps the second transaction isn't really committed? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly From tgl@sss.pgh.pa.us Wed Apr 9 21:31:16 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6DF60475D3B; Wed, 9 Apr 2003 17:31:16 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id AD450475B99; Wed, 9 Apr 2003 17:31:15 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39LVF2L010161; Wed, 9 Apr 2003 17:31:15 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <013401c2fede$9754ff40$ff926b80@amer.cisco.com> References: <013401c2fede$9754ff40$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 14:25:48 -0700" Date: Wed, 09 Apr 2003 17:31:15 -0400 Message-ID: <10160.1049923875@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/165 X-Sequence-Number: 8320 "Chris White" writes: > The first and second are over the same connection. The third is over a > different connection, but issued after the second transaction has completed. Oh? At this point I'm prepared to bet that the second transaction isn't really committed when you think it is. Perhaps the "COMMIT" command isn't getting flushed out to the backend on time. You might want to turn on query logging and watch to see exactly what happens when. regards, tom lane From cjwhite@cisco.com Wed Apr 9 21:41:13 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 76877475B99; Wed, 9 Apr 2003 17:41:13 -0400 (EDT) Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by postgresql.org (Postfix) with ESMTP id 6E310475A8D; Wed, 9 Apr 2003 17:41:12 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-2.cisco.com (8.12.6/8.12.6) with ESMTP id h39Lf9gG028280; Wed, 9 Apr 2003 14:41:11 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB83983; Wed, 9 Apr 2003 14:41:08 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 14:41:07 -0700 Message-ID: <013501c2fee0$bb42ecd0$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <10160.1049923875@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-31.5 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,ORIGINAL_MESSAGE, QUOTED_EMAIL_TEXT,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/166 X-Sequence-Number: 8321 How do I do that? -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Tom Lane Sent: Wednesday, April 09, 2003 2:31 PM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 "Chris White" writes: > The first and second are over the same connection. The third is over a > different connection, but issued after the second transaction has completed. Oh? At this point I'm prepared to bet that the second transaction isn't really committed when you think it is. Perhaps the "COMMIT" command isn't getting flushed out to the backend on time. You might want to turn on query logging and watch to see exactly what happens when. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly From tgl@sss.pgh.pa.us Wed Apr 9 21:45:21 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CB6A0475CEE; Wed, 9 Apr 2003 17:45:21 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id C4D10475A8D; Wed, 9 Apr 2003 17:45:20 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39LjK2L010273; Wed, 9 Apr 2003 17:45:20 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <013501c2fee0$bb42ecd0$ff926b80@amer.cisco.com> References: <013501c2fee0$bb42ecd0$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 14:41:07 -0700" Date: Wed, 09 Apr 2003 17:45:20 -0400 Message-ID: <10272.1049924720@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.1 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/167 X-Sequence-Number: 8322 "Chris White" writes: > How do I do that? In 7.2 I believe what you want to turn on is debug_print_query, and likely also log_timestamp and log_pid (unless you are logging to syslog, which will supply those items for you). Don't forget to SIGHUP the postmaster after you edit postgresql.conf. regards, tom lane From blind@xythos.com Wed Apr 9 21:52:57 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 21A74475458; Wed, 9 Apr 2003 17:52:57 -0400 (EDT) Received: from mail.xythos.com (unknown [206.14.210.116]) by postgresql.org (Postfix) with ESMTP id 13C4A474E42; Wed, 9 Apr 2003 17:52:56 -0400 (EDT) Received: from ravms by mail.xythos.com with mail-ok (Exim 3.36 #3) id 193NV4-0002jT-00; Wed, 09 Apr 2003 21:52:58 +0000 Received: from localhost.localdomain ([127.0.0.1] helo=xythos.com) by mail.xythos.com with asmtp (Exim 3.36 #3) id 193NV3-0002jI-00; Wed, 09 Apr 2003 21:52:57 +0000 Message-ID: <3E949639.90306@xythos.com> Date: Wed, 09 Apr 2003 14:52:57 -0700 From: Barry Lind User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cjwhite@cisco.com Cc: 'Tom Lane' , pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 References: <013501c2fee0$bb42ecd0$ff926b80@amer.cisco.com> In-Reply-To: <013501c2fee0$bb42ecd0$ff926b80@amer.cisco.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Envelope-To: cjwhite@cisco.com, tgl@sss.pgh.pa.us, pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org X-Spam-Status: No, hits=-38.8 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/190 X-Sequence-Number: 8345 It is a setting in the postgresql.conf file. In 7.2 you set the parameter debug_print_query to true (in 7.3 the parameter named changed to log_statement) --Barry Chris White wrote: > How do I do that? > > -----Original Message----- > From: pgsql-jdbc-owner@postgresql.org > [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Tom Lane > Sent: Wednesday, April 09, 2003 2:31 PM > To: cjwhite@cisco.com > Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org > Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres > 7.2.1 > > > "Chris White" writes: > >>The first and second are over the same connection. The third is over a >>different connection, but issued after the second transaction has > > completed. > > Oh? At this point I'm prepared to bet that the second transaction isn't > really committed when you think it is. Perhaps the "COMMIT" command > isn't getting flushed out to the backend on time. You might want to > turn on query logging and watch to see exactly what happens when. > > regards, tom lane > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > From cjwhite@cisco.com Wed Apr 9 22:33:36 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F358A475D3B; Wed, 9 Apr 2003 18:33:36 -0400 (EDT) Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by postgresql.org (Postfix) with ESMTP id 34D08475CEE; Wed, 9 Apr 2003 18:33:36 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-1.cisco.com (8.12.6/8.12.6) with ESMTP id h39MXami011032; Wed, 9 Apr 2003 15:33:36 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB90383; Wed, 9 Apr 2003 15:33:36 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 15:33:34 -0700 Message-ID: <013601c2fee8$0f37fb30$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <10272.1049924720@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-21.8 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,ORIGINAL_MESSAGE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/168 X-Sequence-Number: 8323 Thanks will try these. Do you think I need to change the sync method for the database? It is currently set to the default. I have an idea that the problem could be that the connection is being used again to save another large object when the database is shutdown and although we try to do a smart shutdown if after 60 seconds postgres doesn't shutdown, we kill it and thus could lose unsynched transactions. Chris -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Tom Lane Sent: Wednesday, April 09, 2003 2:45 PM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 "Chris White" writes: > How do I do that? In 7.2 I believe what you want to turn on is debug_print_query, and likely also log_timestamp and log_pid (unless you are logging to syslog, which will supply those items for you). Don't forget to SIGHUP the postmaster after you edit postgresql.conf. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) From tgl@sss.pgh.pa.us Wed Apr 9 22:45:22 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 75A2F474E42; Wed, 9 Apr 2003 18:45:22 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 9DE73476237; Wed, 9 Apr 2003 18:45:20 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39MjI2L010576; Wed, 9 Apr 2003 18:45:18 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <013601c2fee8$0f37fb30$ff926b80@amer.cisco.com> References: <013601c2fee8$0f37fb30$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 15:33:34 -0700" Date: Wed, 09 Apr 2003 18:45:18 -0400 Message-ID: <10575.1049928318@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.1 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/169 X-Sequence-Number: 8324 "Chris White" writes: > Do you think I need to change the sync method for the > database? No, that's not relevant unless you are looking at failure to recover from a power loss. regards, tom lane From cjwhite@cisco.com Wed Apr 9 22:56:25 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D765847631B; Wed, 9 Apr 2003 18:56:25 -0400 (EDT) Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by postgresql.org (Postfix) with ESMTP id C48B9476352; Wed, 9 Apr 2003 18:56:22 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-1.cisco.com (8.12.6/8.12.6) with ESMTP id h39MuNmi004160; Wed, 9 Apr 2003 15:56:23 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB92796; Wed, 9 Apr 2003 15:56:20 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 15:56:19 -0700 Message-ID: <013701c2feeb$3c8f2920$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <10575.1049928318@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-19.1 required=5.0 tests=BAYES_20,EMAIL_ATTRIBUTION,IN_REP_TO,ORIGINAL_MESSAGE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/171 X-Sequence-Number: 8326 Yes we are looking at the ability to recover from a power loss. However, we only want to recover what we think has been committed to the database. -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Wednesday, April 09, 2003 3:45 PM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 "Chris White" writes: > Do you think I need to change the sync method for the > database? No, that's not relevant unless you are looking at failure to recover from a power loss. regards, tom lane