On 19/07/2017 11:52 PM, Tom Lane wrote:
Evan Martin writes:
I have an application that imports a lot of data and the does some
queries on it to build some caches in the database, all in one long
transaction. One of those cache updates repeatedly calls a plpgsql
function, which internally does
I have an application that imports a lot of data and the does some
queries on it to build some caches in the database, all in one long
transaction. One of those cache updates repeatedly calls a plpgsql
function, which internally does some SQL queries. Sometimes this is
much, much slower than us
On 31/10/2016 8:26 PM, Melvin Davidson wrote:
I have tried using an event trigger to detect table creation (ie:
tg_event_audit_all ) however, that does not parse the schema_name and
objid
as does pg_event_trigger_dropped_objects(), so I am not sure that is a
practical way to audit.
Event trig
If I have a query that reads from system tables like pg_class,
pg_namespace, pg_attribute, pg_type, etc. and I'd like to cache the
results in my application is there any fast way to detect when any
changes have been made to these system catalogs? I don't need to know
exactly what has changed.
inside the transaction block doesn't prevent the constraint violation,
either.
On 28/04/2015 2:16 PM, John McKown wrote:
On Mon, Apr 27, 2015 at 7:45 AM, Evan Martin
mailto:postgre...@realityexists.net>>wrote:
I submitted the following bug report through the web form a few
d
I submitted the following bug report through the web form a few days
ago. It's causing problems in my application and I've been unable to
find a way to get around it. If someone here, familiar with PostgreSQL
internals, could suggest a workaround I'd really appreciate it!
I have a deferred EX
Hello,
I'm using PostgreSQL 9.2.8 via Npgsql 2.2.0. When a query times out it
returns error 57014 with the message "canceling statement due to
statement timeout". I use the message to detect the timeout and re-try
in some cases. It seems a bit wrong to rely on the message, though - I
presume
Hi All,
I have a database schema where if row is deleted from one table the rows
it references in another table should also be deleted, unless still
referenced by something else.
Eg. Table A has foreign key to table B. When I delete a row from A I
also want to delete the referenced row in B,
On 04/02/2014 19:56, David Johnston wrote:
No, they cannot. If the arguments change you are dealing with an entirely
new object. And often you end up keeping the old function around for
backward-compatibility.
Of course, I understand that it's a different object, technically, but
from the user
In a nutshell: I think the difficulty of dropping functions is
inconsistent with the difficulty of dropping other objects and I'd like
to see this inconsistency fixed.
So I don't agree with the suggestion of matching function names using a
regex, since that's not supported for other types of o
ads of a
given function name..."
Regards,
Evan
On 03/02/2014 19:09, Tom Lane wrote:
Evan Martin writes:
Is there any easy way to drop a function (all overloads of it) without
knowing the parameter types?
Something along the lines of
do $$
declare fname text;
begin
for fname in sel
Hi All,
Is there any easy way to drop a function (all overloads of it) without
knowing the parameter types? If not, it would be good to see it added.
When I change a function definition I just want to run the SQL script
that defines it and have any existing function replaced. CREATE OR
REPLA
I'd like to rename one of the labels of an enum in PostgreSQL 9.2 This
can easily be done by updating pg_enum, as described at
http://tech.valgog.com/2010/08/alter-enum-in-postgresql.html but I'd
like to understand: what is the danger of doing so? If, as the post
says, the data only references
though, and such pain points are unnecessary. Backups and restores
should "just work". They do in MSSQL and I think they can in Postgres, too.
Regards,
Evan
On 04.09.2013 23:26, David Johnston wrote:
Evan Martin wrote
When I use pg_restore with --clean to restore a PostgreSQL 9.2.
Johnston wrote:
Evan Martin wrote
Also, even without --clean I get 3 errors:
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 6755; 2618 4417788 RULE
geometry_columns_delete em
pg_restore: [archiver (db)] could not execute query: ERROR: rule
ould
want any existing function with the same signature to be overwritten.
On 04.09.2013 18:20, Adrian Klaver wrote:
On 09/04/2013 07:02 AM, Evan Martin wrote:
Also, even without --clean I get 3 errors:
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Erro
When I use pg_restore with --clean to restore a PostgreSQL 9.2.4database
into a new, blank database it generates thousands of error messages like
this:
pg_restore: [archiver (db)] could not execute query: ERROR: schema
"myschema" does not exist
Command was: DROP INDEX myschema.some_index
On 22/06/2012 12:07 AM, Tom Lane wrote:
SELECT pg_terminate_backend(procpid)
FROM pg_stat_activity
WHERE datname = 'dropme';
ERROR: must be superuser to signal other server processes
As far as that goes, there's a pending patch to reduce the privileges
required to use pg_terminate_backend. I'm
On 21/06/2012 10:20 PM, Sergey Konoplev wrote:
On Thu, Jun 21, 2012 at 2:03 PM, Evan Martin
wrote:
1) The workaround requires extra work for each developer (or at least each
client application) using PostgreSQL, while a fix in PostgreSQL would solve
this once and for all.
It is not clean what
privileges, which I don't think
should be required to drop your own database.
Regards,
Evan
On 20/06/2012 10:51 PM, Sergey Konoplev wrote:
On Tue, Jun 19, 2012 at 1:40 PM, Evan Martin
wrote:
When I'm developing against a PostgreSQL database I often drop and re-create
it and I often
Hi All,
When I'm developing against a PostgreSQL database I often drop and
re-create it and I often find that the drop fails, because it's "in use
by other users". This is really annoying, especially when I know full
well there are no other users - it's just me.
I'm aware of the workaround:
DWithin? Just trying to understand this better so I
know what to ask on the PostGIS list.
Thanks,
Evan
On 17/05/2012 12:31 AM, Tom Lane wrote:
Evan Martin writes:
I've run into a weird query performance problem. I have a large, complex
query which joins the results of several set-r
I've run into a weird query performance problem. I have a large, complex
query which joins the results of several set-returning functions with
some tables and filters them by calling another function, which involves
PostGIS calls (ST_DWithin). This used to run in about 10 seconds until I
change
I dug a bit further into this and found that the code was also creating
and releasing a savepoint for each insert (and there were over 10,000 of
them). When I removed that the delay at the end disappeared.
Regards,
Evan
On 11/05/2012 8:26 PM, Simon Riggs wrote:
On 11 May 2012 11:16, Evan
I'm running a bulk import application against PostgreSQL 9.1.3, which
has several stages and each stage follows the same general pattern:
BEGIN TRANSACTION
DELETE (many rows)
CREATE SAVEPOINT
INSERT
...
RELEASE SAVEPOINT
CREATE SAVEPOINT
INSERT
INSERT
... half an hour of inserts later ...
RELE
e which are
inherent limitations and which are current implementation restrictions.
I'm going to write this up as a blog post just for my own reference, but
nobody else is going to find it there. I'd love to see it documented
properly by someone who knows what they're talking about
I'm surprised more people don't run into
it. Even better would be some query that checks whether a function is
inlineable - maybe not perfectly, but it could detect a few of the
reasons just from pg_proc, right?
Regards,
Evan
On 2/05/2012 11:41 PM, Tom Lane wrote:
Evan Martin writ
valid_time_end
IS NULL) OR ('2012-04-01 00:00:00'::timestamp without time zone <
(valid_time_end)::timestamp without time zone)))
Any idea what's going on? It seems like the query optimizer randomly
changes its mind about inlining it.
Regards,
Evan
On 2/05/2012 3:34 PM, E
PostgreSQL - they're not inlined any more. I really don't
know what to think!
Regards,
Evan
On 2/05/2012 1:44 PM, Tom Lane wrote:
Evan Martin writes:
Some of my functions are running much slower than doing the same query
"inline" and I'd like to know if there's
Some of my functions are running much slower than doing the same query
"inline" and I'd like to know if there's a way to fix that.
I have a number of tables that store data valid at different times. For
each logical entity there may be multiple rows, valid at different times
(sometimes overlap
Hi,
Are there any plans to fix the caveats documented in section 5.8.1,
particularly allowing rows in a derived table to satisfy a foreign key
defined on a base table? I know it's on the TODO list (
http://wiki.postgresql.org/wiki/Todo#Inheritance ) - just wondering if
anyone is actually work
31 matches
Mail list logo