Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-20 Thread Andrus
Hi! Today got 2 errors in patched version: 2021-03-20 20:31:27 EET stats collector LOG:  could not rename temporary statistics file "pg_stat_tmp/global.tmp" to "pg_stat_tmp/global.stat": Permission denied 2021-03-20 20:51:25 EET stats collector LOG:  could not rename temporary stati

Re: More than one UNIQUE key when matching items..

2021-03-20 Thread Laurenz Albe
On Sat, 2021-03-20 at 15:51 +, Ron Clarke wrote: > In SQL Server this is easy, we insert the records into a temporary table with > separate Unique > indexes on the id for set a and the ids for set b and put the > 'ignore_dup_key' on which tells > SQL Server to ignore duplicate rows and carr

Re: Unkillable processes creating millions of tiny temp files

2021-03-20 Thread Jan Wieck
On 3/5/21 6:57 PM, Tom Lane wrote: Not sure how fast that is either. If you need to do it again, you could try manually rm'ing everything under the pgsql_tmp directory before letting the postmaster start. That is actually a strategy that works rather well. mv(1) the tmp directory to something

Re: More than one UNIQUE key when matching items..

2021-03-20 Thread Allan Kamau
On Sat, Mar 20, 2021 at 6:52 PM Ron Clarke wrote: > /* > I'm trying to port a system from SQL server, and at the same time better > learn postgreSQL. > > I've come across a problem that is easily solved in that world, but I am > struggling to find an approach in postgres that works. > > We have 2

Re: Programmatic Trigger Create

2021-03-20 Thread Tom Lane
Adrian Klaver writes: > In what program is: > EXEC SQL EXECUTE IMMEDIATE :my_sql_cmd > being done? Presumably ECPG, which if memory serves defaults to not-auto-commit. Maybe Niko is failing to commit the transaction? If all else fails, turning on log_statements on the server and examining the lo

Re: Programmatic Trigger Create

2021-03-20 Thread Adrian Klaver
On 3/20/21 10:03 AM, Niko Ware wrote: I would like to programmatically create audit trail functions which are called by triggers for custom user tables. This will be used for audit trail generation in our application. The user is able to define a custom table. Therefore, I need a custom audit t

Programmatic Trigger Create

2021-03-20 Thread Niko Ware
I would like to programmatically create audit trail functions which are called by triggers for custom user tables. This will be used for audit trail generation in our application. The user is able to define a custom table. Therefore, I need a custom audit trail function. The audit trail function ou

More than one UNIQUE key when matching items..

2021-03-20 Thread Ron Clarke
/* I'm trying to port a system from SQL server, and at the same time better learn postgreSQL. I've come across a problem that is easily solved in that world, but I am struggling to find an approach in postgres that works. We have 2 sets of events A and B (sets), they have a shared number (ncode),

Re: questions about wraparound

2021-03-20 Thread Luca Ferrari
On Thu, Mar 18, 2021 at 12:14 PM Luca Ferrari wrote: > testdb=> select datname, datfrozenxid, age(datfrozenxid) from pg_database; > datname | datfrozenxid | age > ---+--+-- > postgres | 3318163526 | 5002 > backupdb | 3318163526 | 5002 > template1 |

Re: SELECT is faster on SQL Server

2021-03-20 Thread Frank Millman
On 2021-03-19 7:11 PM, Thomas Kellerer wrote: Frank Millman schrieb am 19.03.2021 um 10:16: cl_bal selects WHERE tran_date <= '2018-03-31'. op_bal selects WHERE tran_date < '2018-03-01'. The second one could be written as WHERE tran_date <= '2018-02-28', but I don't think that would make a