Thread: Bug: Missing tuples in results written to file

Bug: Missing tuples in results written to file

From
Erwin Brandstetter
Date:
Hi developers!

I am testing pgAdmin III Beta 3 (Oct 12 2006, re: 5475) on Windows XP 
(German, latest patch level).

When I try to use the feature "Execute Query, write result to file" in 
the SQL dialogue window, the result is wrong half of the time.
Tried it many times. Sometimes the results are correct, sometimes not. 
Seems to happen at random. This is what happens:
Leading column names are there (as requested). Then some of the first 
tuples are missing. Instead, the same number of lines with only column 
separators (empty tuples?) is appended at the end.
pgAdmin invariably reports a success "Data export completed successfully".
The results of the same query are never wrong in the output pane.

Maybe a timing issue? (I am accessing a remote database server via SSH 
tunnel & port forwarding)
I would classify randomly missing data as serious.

The problem also exists in the latest build that Dave mailed me (rev: 
5475:5496)
v1.4.2 is not affected, though.


Regards
Erwin Brandstetter


Re: Bug: Missing tuples in results written to file

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of
> Erwin Brandstetter
> Sent: 17 October 2006 02:05
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Bug: Missing tuples in results
> written to file
>
> Hi developers!
>
> I am testing pgAdmin III Beta 3 (Oct 12 2006, re: 5475) on Windows XP
> (German, latest patch level).
>
> When I try to use the feature "Execute Query, write result to
> file" in
> the SQL dialogue window, the result is wrong half of the time.
> Tried it many times. Sometimes the results are correct,
> sometimes not.
> Seems to happen at random. This is what happens:
> Leading column names are there (as requested). Then some of the first
> tuples are missing. Instead, the same number of lines with
> only column
> separators (empty tuples?) is appended at the end.
> pgAdmin invariably reports a success "Data export completed
> successfully".
> The results of the same query are never wrong in the output pane.

I cannot reproduce this here, so if I can ask a few questions...

1) What encoding is your database in?

2) What encoding are you saving the data in? Have you tried both
options? (Local and UTF-8)

3) Can you provide a sample table with which you can reproduce the
problem that I can test with?

BTW, I'm away for a few days from tomorrow so may not answer
immediately.

Thanks, Dave.


Re: Bug: Missing tuples in results written to file

From
Erwin Brandstetter
Date:
dpage@vale-housing.co.uk wrote:
>> -----Original Message-----
>> From: pgadmin-support-owner@postgresql.org 
>> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of 
>> Erwin Brandstetter
>> Sent: 17 October 2006 02:05
>> To: pgadmin-support@postgresql.org
>> Subject: [pgadmin-support] Bug: Missing tuples in results 
>> written to file
>>
>> Hi developers!
>>
>> I am testing pgAdmin III Beta 3 (Oct 12 2006, re: 5475) on Windows XP 
>> (German, latest patch level).
>>
>> When I try to use the feature "Execute Query, write result to 
>> file" in 
>> the SQL dialogue window, the result is wrong half of the time.
>> Tried it many times. Sometimes the results are correct, 
>> sometimes not. 
>> Seems to happen at random. This is what happens:
>> Leading column names are there (as requested). Then some of the first 
>> tuples are missing. Instead, the same number of lines with 
>> only column 
>> separators (empty tuples?) is appended at the end.
>> pgAdmin invariably reports a success "Data export completed 
>> successfully".
>> The results of the same query are never wrong in the output pane.
>>     
>
> I cannot reproduce this here, so if I can ask a few questions...
>   
It does not happen every time. In my case, it happens in like 10-50% of 
the time.
My best guess is a timing issue. Maybe my sepcial setup adds to it again 
(SSH connection with port forwarding to remote server).
However, I have run tests with almost saturated network connection and 
it didn't make a noteable difference.

BTW, a little more space for the filename in the export dialogue 
wouldn't hurt.

> 1) What encoding is your database in?
>   
utf-8

> 2) What encoding are you saving the data in? Have you tried both
> options? (Local and UTF-8)
>   
Happens either way.
It seems to happen less often with  utf-8 (being my db encoding). But 
the difference was not overwhelmingly significant.

> 3) Can you provide a sample table with which you can reproduce the
> problem that I can test with?
>   
Tried it with a number of different sources. tables, views (simple and 
complex). It randomly happens with each of them.
When I chose a _new_ output file, then it happens almost every time; 
when I change the query or any setting, it happens often; when repeating 
the same export it happens rarely (but still randomely).

> BTW, I'm away for a few days from tomorrow so may not answer
> immediately.
>   

Have a nice trip / vacation / whatever! :)


Regards
Erwin


Re: Bug: Missing tuples in results written to file

From
"Dave Page"
Date:

> -----Original Message-----
> From: Erwin Brandstetter [mailto:brandstetter@falter.at]
> Sent: 17 October 2006 16:06
> To: Dave Page
> Cc: pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] Bug: Missing tuples in results
> written to file
>
>
> It does not happen every time. In my case, it happens in like
> 10-50% of
> the time.

I've run at least 20-30 tests now.

> My best guess is a timing issue. Maybe my sepcial setup adds
> to it again
> (SSH connection with port forwarding to remote server).
> However, I have run tests with almost saturated network
> connection and
> it didn't make a noteable difference.

If it were timing then it would affect the grid as well as it's the same
loop around the query thread used for both options before displaying or
saving the data.

> Tried it with a number of different sources. tables, views
> (simple and
> complex). It randomly happens with each of them.
> When I chose a _new_ output file, then it happens almost every time;
> when I change the query or any setting, it happens often;
> when repeating
> the same export it happens rarely (but still randomely).

With a new file, will it fail on a system table such as pg_class, or
just your data?

Regards, Dave.