Tag Info

New answers tagged

0

The answer from craig-ringer fully answers the question. For the sake of completeness, I add up the following trivial code to solve the issue using locks: create or replace function f_requestJob( jobs text, jobs_running text, jobs_completed text ) returns bigint as $$ declare sql varchar; c bigint; begin execute ...


1

I'd suspect you have standard_conforming_strings set to OFF on the 9.1 instance (meaning it was changed explicitly, since the default is ON since 9.1), and the opposite in 9.2. Demo: test=> select version(); version ...


0

Works for me. regress=> WITH x(v) AS (VALUES ('text ACT txt'), ('ACT tests'), ('tests ACT')) regress-> SELECT v FROM x WHERE v ~* '\yACT\y'; v -------------- text ACT txt ACT tests tests ACT (3 rows) on: regress=> SELECT version(); version ...


4

Specific issues with the query PostgreSQL defaults to READ COMMITTED isolation, and it looks like you're not using anything different. In READ COMMITTED each statement gets its own snapshot. It cannot see uncommitted changes from other transactions; it's as if they simply haven't happened. Now, imagine you run this simultaneously in three sessions, on a ...


3

You have corrupted your database by manually deleting files from within the data directory. Never delete files from within the data directory manually. Safely removing WAL If you want to remove WAL, either let the server do it at CHECKPOINT time, or use pg_archivecleanup. Note that the server will remove WAL is no longer needs automatically, unless: ...


1

Well, you are running this giant UPDATE statement of all rows in table B: update B t1 set b1 = t2.a1 from (select b1, b2 from B) t2 where t1.a2 = t2.b2; which will more-or-less double the size of the table, since the UPDATE has to keep old row versions around. You may want to read up a bit on how PostgreSQL implements MVCC and how vacuuming works, but to ...


1

I just wanted to add that in addition to to changing pg_hba.conf file from local all all peer to local all all md5 As per the accepted answer, the only way I could log in after doing the same thing the OP was doing was to pass the -h flag when trying to login. $ psql -U postgres -h localhost Hopefully, this will help someone in ...



Top 50 recent answers are included