RE: Duplicate tables information through metadata queries - Mailing list pgsql-jdbc

From ldh@laurent-hasson.com
Subject RE: Duplicate tables information through metadata queries
Date
Msg-id MN2PR15MB2560536B67BF465F13FF964185D59@MN2PR15MB2560.namprd15.prod.outlook.com
Whole thread Raw
In response to Re: Duplicate tables information through metadata queries  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Duplicate tables information through metadata queries  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-jdbc
>  
>  From: David G. Johnston <david.g.johnston@gmail.com> 
>  Sent: Wednesday, September 8, 2021 20:54
>  To: Dave Cramer <davecramer@postgres.rocks>
>  Cc: Andrew Dunstan <andrew@dunslane.net>; ldh@laurent-hasson.com; pgsql-jdbc@lists.postgresql.org
>  Subject: Re: Duplicate tables information through metadata queries
>  
>  On Wednesday, September 8, 2021, Dave Cramer <mailto:davecramer@postgres.rocks> wrote:
>  https://github.com/pgjdbc/pgjdbc/pull/2245
>  
>  I'd like to add a test case that would break otherwise,  
>  
>  Seems like munging OIDs on system tables would be outside what the test environment would be reasonably capable of
doing,though I’m not familiar with whether you can mock the server and stub out a  resultset response to the query that
wouldcontain multiple records.  The error mode is not returning exactly one record.  Testing for that at runtime is
simple,but what is a good response if that unlikely event happens?
 
>  
>  I don’t know if it is even possible for a stock install to have two OIDs globally duplicated - though it isn’t hard
tocheck for on a given server.  Creating thousands of tables, or types, or whatnot on said server until a global
duplicateappears would be fairly straight-forward, if potentially time and, to a lesser extent (drop table et al.)
spaceconsuming.  Probably worth doing for adhoc testing but less so in a unit test suite.
 
>  
>  David J.


Hello David, Andrew,

We certainly have a lot of migrations and "vacuum full" over the years for example on our many db instances. And we
havelots of entities in the db as per the logs I shared (thousands including columns, tables, views etc...). Is there
somethingI could help with given what I have on my local dev environment? Maybe a limited schema-only backup that would
allowto replicate the issue somewhere else or are you good? I can certainly look at a debug version of the driver (if I
canget access to the JAR somewhere) and could test it. I am not able to make a build from github based on what I saw
forhttps://github.com/pgjdbc/pgjdbc/pull/2245, which looks like the right fix as per the thread.
 

Thank you,
Laurent.





pgsql-jdbc by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Duplicate tables information through metadata queries
Next
From: Andrew Dunstan
Date:
Subject: Re: Duplicate tables information through metadata queries