Thread: About db session time-out while uploading data to database
Hi,
I have a fuction that uploading data.
if DB session time-out has happen while data is uploading,
I wonder that data in my database have been rollback or not.
Thanks for advance,
Parichart
I have a fuction that uploading data.
if DB session time-out has happen while data is uploading,
I wonder that data in my database have been rollback or not.
Thanks for advance,
Parichart
"=?ISO-2022-JP?B?GyRCIXkbKEJQdW11IDotRCAbJEIheRsoQiA=?=" <paricharts@gmail.com> writes: > I have a fuction that uploading data. > if DB session time-out has happen while data is uploading, > I wonder that data in my database have been rollback or not. You are not very clear about what you mean by "uploading", but in general a PG backend will never commit a command that it hasn't fully received from the client. regards, tom lane
Hi,
Thanks a lot for your reply.
Thanks a lot for your reply.
On Fri, Mar 21, 2008 at 11:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
my file-upload function is run on a web and connect to postgreSQL database.
While this upload function was uploading data to database,its web page turn to display "
( I think one of this event 's cause is DB access time out )
regards,
parichart
"☆Pumu :-D ☆ " <paricharts@gmail.com> writes:You are not very clear about what you mean by "uploading", but in
> I have a fuction that uploading data.
> if DB session time-out has happen while data is uploading,
> I wonder that data in my database have been rollback or not.
general a PG backend will never commit a command that it hasn't fully
received from the client.
regards, tom lane
my file-upload function is run on a web and connect to postgreSQL database.
While this upload function was uploading data to database,its web page turn to display "
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. "( I think one of this event 's cause is DB access time out )
regards,
parichart
"=?ISO-2022-JP?B?GyRCIXkbKEJQdW11IDotRCAbJEIheRsoQiA=?=" <paricharts@gmail.com> writes: > my file-upload function is run on a web and connect to postgreSQL database. > While this upload function was uploading data to database,its web page turn > to display " > The page cannot be displayedThe page you are looking for is currently > unavailable. The Web site might be experiencing technical difficulties, or > you may need to adjust your browser settings. " > ( I think one of this event 's cause is DB access time out ) Well, with only that much detail it's impossible to say. But have you looked into the postmaster's log to see what the server-side view of the situation was? If you see messages like "unexpected EOF" that would be suggestive. Personally I'd bet that this is just a garden-variety bug in your upload function. Again, the server-side log might be helpful in debugging the problem. If all else fails, try setting log_statement = 'all' while you recreate the problem, so you can see exactly what the last command is. regards, tom lane