Re: foreign key on delete cascade order?

2022-03-14 Thread George Woodring
For the update processes, all other tables are read-only reference tables, I don't think they would be locked. iGLASS Networks www.iglass.net On Fri, Mar 11, 2022 at 10:03 PM Michael Lewis wrote: > Could you set lock_timeout, lock table explicitly for SHARE UPDATE > EXCLUSIVE (pretty sure tha

Re: foreign key on delete cascade order?

2022-03-11 Thread George Woodring
On Thu, Mar 10, 2022 at 12:38 PM Tom Lane wrote: > With the amount of detail you've provided (viz: none) > This is an example of the error we are seeing from our application. Sorry, I cannot find the postgresql log entry for this one. 2020-11-30T13:16:08,835 ERROR [foo/bar/01EF2.W01E/55159] Glo

Re: foreign key on delete cascade order?

2022-03-10 Thread George Woodring
On Thu, Mar 10, 2022 at 10:56 AM Tom Lane wrote: > Each cascaded delete ought to be removing a disjoint set of rows in the > referencing table, so I'm not quite sure why order should matter. > > regards, tom lane > I have always thought the way to avoid deadlocks was to

foreign key on delete cascade order?

2022-03-10 Thread George Woodring
When using FOREIGN KEY ON DELETE CASCADE, is there an order the entries are being deleted? We are seeing intermittent deadlocks with trying to update a table with the foreign key entry being deleted. We have 4 levels of tables chained by foreign keys. machine -> point -> poll -> status The stat

Re: Check for duplicates before inserting new rows

2020-09-04 Thread George Woodring
I would suggest creating a temp table based on the original table and loading the data into it first. You can then purge the duplicates. George Woodring iGLASS Networks www.iglass.net On Fri, Sep 4, 2020 at 9:21 AM Rich Shepard wrote: > This is a new issue for me: I've received dat

Re: export to parquet

2020-08-26 Thread George Woodring
eated. If you are interested I can share the AWS CLI commands we use. George Woodring iGLASS Networks www.iglass.net On Wed, Aug 26, 2020 at 3:00 PM Scott Ribe wrote: > I have no Hadoop, no HDFS. Just looking for the easiest way to export some > PG tables into Parquet format for testi

How to make transaction delete see data from a just completed concurrent transaction?

2019-08-05 Thread George Woodring
We have been using the model of updating certain data in a table of begin; delete from foo where bar='myfoo'; insert into foo all of the correct data for myfoo; commit; Our thinking was that if you had two running at close to the same time, the first transaction would finish and then the second o

Re: Why adding BEFORE TRIGGER affect client CPU?

2019-01-18 Thread George Woodring
Adrian Klaver writes: > What is the client server and what is it doing? Our client creates a temp table CREATE TEMP TABLE myraw(LIKE raw INCLUDING DEFAULTS) We load data with a copy COPY myraw (transferid, pollgrpid, date, data, rrdtypeid, error ) FROM STDIN WITH DELIMITER '|' We do some checking

Why adding BEFORE TRIGGER affect client CPU?

2019-01-18 Thread George Woodring
could not see any messages printed out anywhere in logs showing any type of error. Thanks, George Woodring iGLASS Networks www.iglass.net

Re: Plpgsql search_path issue going from 9.3 to 9.6

2018-11-13 Thread George Woodring
I apologize for top posting, Google hid all of the other stuff. George iGLASS Networks www.iglass.net >> >>

Re: Plpgsql search_path issue going from 9.3 to 9.6

2018-11-13 Thread George Woodring
CREATE OR REPLACE VIEW tickets AS SELECT *, tableoid FROM public.tickets WHERE ( ticketsid IN (SELECT ticketsid FROM machtick)); iGLASS Networks www.iglass.net On Tue, Nov 13, 2018 at 10:32 AM Adrian Klaver wrote: > On 11/13/18 6:54 AM, Geo

Re: Plpgsql search_path issue going from 9.3 to 9.6

2018-11-13 Thread George Woodring
www.iglass.net On Tue, Nov 13, 2018 at 9:46 AM Adrian Klaver wrote: > On 11/13/18 6:27 AM, George Woodring wrote: > > I think the issue is that the function is not putting the data into the > > tickets%ROWTYPE correctly. When I do \d on public.tickets and > > iss-hackers.ticket

Re: Plpgsql search_path issue going from 9.3 to 9.6

2018-11-13 Thread George Woodring
I can fix my issue easily. George iGLASS Networks www.iglass.net On Tue, Nov 13, 2018 at 8:44 AM Pavel Stehule wrote: > Hi > > Ășt 13. 11. 2018 v 14:18 odesĂ­latel George Woodring < > george.woodr...@iglass.net> napsal: > >> We are having an issue with one of our plpgs

Plpgsql search_path issue going from 9.3 to 9.6

2018-11-13 Thread George Woodring
llowup.date; END LOOP; summary[cstate] := summary[cstate] + extract( EPOCH FROM (current_timestamp - lastdate))::int; RETURN summary; END; $$ LANGUAGE plpgsql; I assume I can fix this by putting the function into each of the schemas, but I thought I would ask opinions before do

Can I disable sslcert/sslkey in pg_service.conf?

2018-06-14 Thread George Woodring
putting a hard coded certificate path in pg_service, but it looks to have its own sets of challenges. Thanks for any suggestions. George Woodring iGLASS Networks www.iglass.net

Clarification on PL/pgSQL query plan caching

2017-12-15 Thread George Woodring
ype = 'ddata' THEN table_name := 'c_current'; END IF; EXECUTE 'SELECT lasttime, lastval FROM ' || table_name || ' WHERE lasttime > $1 AND id = $2 ORDER BY lasttime DESC LIMIT 1' INTO mcurr USING limiter, pid; IF mcurr IS NULL THEN -- RAISE DEBUG 'No previous data found for pgid=%', pgid; return NULL; END IF; Thanks, George Woodring iGLASS Networks www.iglass.net