Does the postgres jdbc driver (rev 42.3) cache prepared statements

2022-02-14 Thread Rob Sargent
I have an embedded tomcat talking directly to postgres server via sql generated by jOOQ.  By default jOOQ creates a prepared statement for all selects, and does so on each invocation from the client (client in this case is a servlet in tomcat).  I've been using jOOQ-to-db for a while but the se

Re: Migration to PGLister - After

2017-11-20 Thread Rob Sargent
Kinda looking like you should have unsubscribed everybody and those of us that would miss the feed would re-connect. On 11/20/2017 02:09 PM, Magnus Hagander wrote: On Mon, Nov 20, 2017 at 9:31 PM, Michael Nolan > wrote: On Mon, Nov 20, 2017 at 9:45 AM, Stephen F

Re: large numbers of inserts out of memory strategy

2017-11-28 Thread Rob Sargent
> On Nov 28, 2017, at 10:17 AM, Ted Toth wrote: > > I'm writing a migration utility to move data from non-rdbms data > source to a postgres db. Currently I'm generating SQL INSERT > statements involving 6 related tables for each 'thing'. With 100k or > more 'things' to migrate I'm generating a l

Re: large numbers of inserts out of memory strategy

2017-11-28 Thread Rob Sargent
On 11/28/2017 10:50 AM, Ted Toth wrote: On Tue, Nov 28, 2017 at 11:19 AM, Rob Sargent wrote: On Nov 28, 2017, at 10:17 AM, Ted Toth wrote: I'm writing a migration utility to move data from non-rdbms data source to a postgres db. Currently I'm generating SQL INSERT statements i

Re: pg data backup from vps

2017-12-01 Thread Rob Sargent
On 12/01/2017 12:56 PM, support-tiger wrote: To diversify risk, we would like to have a daily or weekly data backup stored in another location besides the VPS service we are using - pg_dump is great for the backup but transferring a growing db across the internet to a local machine disk seems

Re: building a server

2017-12-03 Thread Rob Sargent
On 12/03/2017 02:15 PM, John R Pierce wrote: On 12/3/2017 12:47 PM, Gmail wrote: So I revisited https://momjian.us/main/writings/pgsql/hw_selection.pdf Near the end (page 24) I spotted: Heavy use of server-side functions might generate significant CPU load Just want to confirm that this refer

Re: Problem with COPY command on pg_dump

2017-12-09 Thread Rob Sargent
> On Dec 9, 2017, at 8:42 AM, Blake McBride wrote: > > Greetings, > > I am using pg_dump on version 9.5.10 and trying to import it on version > 9.3.20. Many (or all) COPY commands are failing with messages like: > > psql:16504.db:16874: ERROR: missing data for column "street" > CONTEXT:

vacuum curiosity

2017-12-17 Thread Rob Sargent
CAVEAT: I may have another version of this email bouncing around, sorry. Running PG10.0 on Centos 7.4 I thought the current database was quiescent so I’m curious about the line isolated below with “0 dead row" Does that suggest there is an open transaction? vacuum (analyse, verbose) sui.segment

Re: Find duplicates in a column then print Information to a file

2017-12-31 Thread Rob Sargent
Keep in mind there is a quick write-to-file in psql with ‘\o ’. And don’t forget to turn it off with ‘\o’ > On Dec 31, 2017, at 12:04 PM, Sherman Willden wrote: > > Thank you for the replies. I will start working on them now. Not a student > but since I now have the time I may look into it. I

is single row update improved with function

2017-12-31 Thread Rob Sargent
I must update 3M of 100M records, with tuple specific modifications. I can generate the necessary sql, but I’m wondering if files of simple update statements affecting a single row is more effective than files of a function call doing the same update given the necessary values, including where

Re: is single row update improved with function

2017-12-31 Thread Rob Sargent
> On Dec 31, 2017, at 4:31 PM, David Rowley > wrote: > > On 1 January 2018 at 12:06, Rob Sargent wrote: >> I must update 3M of 100M records, with tuple specific modifications. I can >> generate the necessary sql, but I’m wondering if files of simple update >>

Re: is single row update improved with function

2017-12-31 Thread Rob Sargent
> On Dec 31, 2017, at 4:31 PM, David Rowley > wrote: > > On 1 January 2018 at 12:06, Rob Sargent wrote: >> I must update 3M of 100M records, with tuple specific modifications. I can >> generate the necessary sql, but I’m wondering if files of simple update >>

Re: Sv: Re: Sv: Re: data-checksums

2018-01-09 Thread Rob Sargent
On 01/09/2018 03:30 PM, Andreas Joseph Krogh wrote: På tirsdag 09. januar 2018 kl. 23:06:06, skrev Andres Freund mailto:and...@anarazel.de>>: Hi, On 2018-01-09 21:47:17 +0100, Andreas Joseph Krogh wrote: > Does PG use HW-accellerated crc if CPU supports it[1]? Yes we do, for

Re: Insert results in 0 1

2018-01-15 Thread Rob Sargent
> On Jan 15, 2018, at 5:57 PM, Sherman Willden wrote: > > Computer HP Compaq 6710b > Development Platform: Ubuntu 17.10 mainly command line work > Tools: perl 5.26 and postgresql 9.6 > > Why do I get a 0 1 when using insert? > > Thanks; > > Sherman > classical=# INSERT INTO string_groups VALU

Re: Call sql function in psql

2018-01-18 Thread Rob Sargent
> On Jan 18, 2018, at 9:22 AM, Abhra Kar wrote: > > Hi All, > > Please send me some info how to post directly in mailing > list,somwhow I am not able to find out the way so I am mailing here. > > Here is fine > > Present problem-- > > > > I tried to change b

Re: PGSQL 10, many Random named DB

2018-01-24 Thread Rob Sargent
On 01/24/2018 10:22 AM, Merlin Moncure wrote: On Wed, Jan 24, 2018 at 4:52 AM, Durumdara wrote: Hello! Somewhere the system administrator (who don't know the PG really) installed a PGSQL server (10.x) with a database. He couldn't manage the server well. Yesterday my colleague saw 21 databas

\g filename

2018-01-24 Thread Rob Sargent

\g filename

2018-01-24 Thread Rob Sargent
I just ran a query (select myfunction() \g bad/filename) which took almost an hour and a half then told me “no such file or directory” since I had scrogged the path. Could this path not be checked prior to actual execution of the query? ps sorry for the blank version of this same topic - or ma

Re: \g filename

2018-01-24 Thread Rob Sargent
On 01/24/2018 01:38 PM, Adrian Klaver wrote: On 01/24/2018 12:30 PM, Rob Sargent wrote: I just ran a query (select myfunction() \g bad/filename) which took almost an hour and a half then told me “no such file or directory” since I had scrogged the path. Could this path not be checked prior

Re: CannotAcquireResourceException in Junit

2018-01-24 Thread Rob Sargent
> On Jan 24, 2018, at 9:57 AM, Abhra Kar wrote: > > > Hi, > I am getting the following error while running bunch of Junit test > cases through “ant test” command > Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A > ResourcePool could not acquire a resour

Re: CannotAcquireResourceException in Junit

2018-01-24 Thread Rob Sargent
shell or any .sh file with in postgres directory) > > Regards, > Abhra > > On Thu, Jan 25, 2018 at 9:36 AM, Rob Sargent wrote: > > > On Jan 24, 2018, at 9:57 AM, Abhra Kar wrote: > > > > > > Hi, > > I am getting the following error while runnin

Re: Downsides of liberally using CREATE TEMP TABLE ... ON COMMIT DROP

2018-01-28 Thread Rob Sargent
“On commit drop” is generally good practice for several reasons: if your function is called in a loop, or the create statement is in a loop or you want to call your function more than once in a given session (with out explicitly dropping your temp table). The commit in question is the function

Re: Downsides of liberally using CREATE TEMP TABLE ... ON COMMIT DROP

2018-01-28 Thread Rob Sargent
I think the table is dropped by end of function > On Jan 28, 2018, at 2:45 PM, David G. Johnston > wrote: > >> On Sunday, January 28, 2018, Rob Sargent wrote: >> The commit in question is the function btw. > > That doesn't make sense - functions can't commit. > > David J.

Re: Searching Postgresql Database with psycopg2

2018-02-01 Thread Rob Sargent
> On Feb 1, 2018, at 1:50 PM, brandon wallace wrote: > > I have created a function to search a Postgresql database but it only pulls > up the first row of the database no matter what value I search for. Why would > it only pull up the first row of the database? I am using Psycopg2 2.6 and > Py

Re: Rolls

2018-02-01 Thread Rob Sargent
On 02/01/2018 02:22 PM, Andrew Bartley wrote: Hi all, I am trying to work out a way to create a roll/user that can only execute one particular function and nothing else. The particular function has been created with "SECURITY DEFINER". Regards Andrew Bartley And I thought you we offeri

Re: Index Partition Size Double of its Table Partition?

2024-10-31 Thread Rob Sargent
On Oct 31, 2024, at 10:02 AM, Don Seiler wrote:On Wed, Oct 30, 2024 at 4:59 PM David Mullineux wrote:Are you able to cluster the table ? The idea is that rows ordered in the same way  as the index might reduce it's size ? I'm not sure on this. There are other indexes on these t

Re: load fom csv

2024-09-18 Thread Rob Sargent
...@gmail.com> wrote:I'll echo vars and see if something looks strange.THanks.On Tue, Sep 17, 2024 at 3:46 PM Rob Sargent <robjsarg...@gmail.com> wrote: > On Sep 17, 2024, at 12:25 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > > On 9/17/24 09:21, Andy Har

Re: load fom csv

2024-09-17 Thread Rob Sargent
> On Sep 17, 2024, at 12:25 PM, Adrian Klaver wrote: > > On 9/17/24 09:21, Andy Hartman wrote: >> The command work outside of powershell yes > > Then you are going to need to use whatever debugging tools PowerShell has > available to step through the script to figure out where the problem

Re: JDBC using REFERENCES

2024-11-24 Thread Rob Sargent
> On Nov 24, 2024, at 7:15 PM, Arbol One wrote: > >  > In an application that uses JDBC I am trying to use the following statement > >// Table parameters > var sql = new MyString(); > sql.setData("CREATE TABLE IF NOT EXISTS "); >

Re: uninstalling postgresql 13 on ubuntu 22.04?

2024-11-27 Thread Rob Sargent
> On Nov 27, 2024, at 3:51 PM, Adrian Klaver wrote: > > On 11/27/24 13:54, Richard Welty wrote: >> i installed pg13 from the postgres repos but am not really using it >> in that form; i'm using docker images instead. i now find i need >> to uninstall it to facilitate upgrading my desktop to u

Re: postgresql-17.0-1 Application - silent installation Issue

2024-11-14 Thread Rob Sargent
> > Please transfer the request who works with windows. We need the solution asap. > > Thanks & Regards, > Urvi Jolapara > urvi.jolap...@safrangroup.com > If a windows admin/user shows up they may be better able to help. There is no one to "transfer" to. The list of missing keys suggests t

Re: Insert records in the tavke only if they are not exist

2024-12-07 Thread Rob Sargent
But not to me. My application targets developers, not end users. Thank you. What does your app enable developers to do?

Re: Lookup tables

2025-02-04 Thread Rob Sargent
On 2/4/25 09:51, Karsten Hilbert wrote: Am Tue, Feb 04, 2025 at 05:31:13PM +0100 schrieb Michał Kłeczek: It is now completely unclear what it means to change the name of the restaurant for already registered visits. Is it still the same restaurant with a different name or a different resta

Re: Lookup tables

2025-02-04 Thread Rob Sargent
On 2/4/25 10:03, Ron Johnson wrote: On Tue, Feb 4, 2025 at 11:31 AM Michał Kłeczek wrote: [snip] The query to register a visit is: insert into restaurant_visit select $user, current_date, restaurant_id, $rating from restaurant where name = $restaurant_name It is now co

Re: How to perform a long running dry run transaction without blocking

2025-02-06 Thread Rob Sargent
> Have you considered a validation app? Have it read the inputs and look in db for conflicts, rather than attempt the insert. Zero transactions necessary

Re: Need help in logical replication

2025-01-13 Thread Rob Sargent
> On Jan 13, 2025, at 5:30 AM, Divyansh Gupta JNsThMAudy > wrote: > >  > Hii PostgreSQL Community, > > I am setting up logical replication between two clusters in the same subnet > group. I’ve created a publication on the primary and a subscription on the > secondary, and the replication

Re: psql command line editing

2025-02-12 Thread Rob Sargent
There's got to be something in your shell config which says "use emacs keys" instead of "use vi keys". -- Death to , and butter sauce. Don't boil me, I'm still alive. lobster! Or something in yours setting vi?

Re: Query optimization

2025-03-13 Thread Rob Sargent
> On Mar 13, 2025, at 8:39 PM, Durgamahesh Manne > wrote: > > > > On Fri, 14 Mar, 2025, 08:04 Rob Sargent, <mailto:robjsarg...@gmail.com>> wrote: > > Hi > > Gave you plan with out limit . Stats up to date insert .on conflict do > nothing run

Re: Query optimization

2025-03-13 Thread Rob Sargent
> > 3) Output of EXPLAIN ANALYZE of query. > > Result (cost=2.80..2.83 rows=1 width=1) (actual time=0.030..0.030 rows=1 > loops=1) >InitPlan 1 (returns $0) > -> Index Only Scan using idx_cachekeys on cachekeys (cost=0.55..2.80 > rows=1 width=0) (actual time=0.029..0.029 rows=1 lo

Re: Quesion about querying distributed databases

2025-03-05 Thread Rob Sargent
> On Mar 5, 2025, at 8:03 PM, Igor Korot jnit worked great for SQL Server. If > you're small, we host them all on one server. If you get bigger, we can put > heavy databases on separate machines. >> >> However, I don't have experience working with other types of database >> scaling. I have us

Re: psql command line editing

2025-02-13 Thread Rob Sargent
On 2/13/25 12:11, Ron Johnson wrote: It appears that the RHEL default /etc/initrc file defines a bunch of escape sequences "for linux console and RH/Debian xterm" cursor keys when in emacs mode. Our servers are RHEL, my ssh client emulates xterm, and is in the default emacs mode.  Thus, th

Re: Keep specialized query pairs, or use single more general but more complex one

2025-02-24 Thread Rob Sargent
API: > * The first type never relies on fuzzy-find. Then have that app type use the simple, fast query. After all each app/code is making an explicit choice which yesterday was the same and tomorrow will be different.

Re: pg_rewind problem: cannot find WAL

2025-05-08 Thread Rob Sargent
> > Any idea? > Clearly, postgresql.auto.conf is within PGDATA, and since my > recovery_command is there, one trick could be to touch and empty > PGDATA/postgresql.conf, pg_rewind, remove the fake configurtion file. > But I'm sure there is a smarter solution. > > Thanks, > Luca > > A symlink

<    2   3   4   5   6   7