Re: [HACKERS] pg_upgrade changes can it use CREATE EXTENSION?

2017-09-05 Thread Sandro Santilli
On Wed, Aug 30, 2017 at 06:01:58PM -0400, Tom Lane wrote: > "Regina Obe" writes: > > I think this thread covers most of the issues. > > https://lists.osgeo.org/pipermail/postgis-devel/2017-August/026355.html > > My thought was is it possible for pg_upgrade to be taught to use

Re: [HACKERS] make check false success

2017-06-05 Thread Sandro Santilli
On Fri, Jun 02, 2017 at 08:20:25AM -0400, Robert Haas wrote: > On Thu, Jun 1, 2017 at 10:18 AM, Sandro Santilli <s...@kbt.io> wrote: > > I noticed that the `check` Makefile rule imported by PGXS is giving > > a success exit code even when it is unsupported. > > &

[HACKERS] make check false success

2017-06-01 Thread Sandro Santilli
ff5 Mon Sep 17 00:00:00 2001 From: Sandro Santilli <s...@kbt.io> Date: Thu, 1 Jun 2017 16:14:58 +0200 Subject: [PATCH] Make sure `make check` fails when it cannot be run --- src/makefiles/pgxs.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/makefiles/pgxs.mk b/src/makefiles/

[HACKERS] ALTER EXTENSION DROP FUNCTION not working ?

2016-02-09 Thread Sandro Santilli
I'm seeing an issue with ALTER EXTENSION DROP FUNCTION not fully unregistering the dependency of the function on the extension. Commands to reproduce described here: https://trac.osgeo.org/postgis/ticket/3450#comment:23 Basically I'm getting: ERROR: cannot drop function

Re: [HACKERS] ALTER EXTENSION DROP FUNCTION not working ?

2016-02-09 Thread Sandro Santilli
On Tue, Feb 09, 2016 at 10:33:42AM +0100, Sandro Santilli wrote: > https://trac.osgeo.org/postgis/ticket/3450#comment:23 > > Basically I'm getting: > > ERROR: cannot drop function pgis_twkb_accum_finalfn(internal) because other > objects depend on it > DETAIL: exte

[HACKERS] [patch] extensions_path GUC

2015-10-23 Thread Sandro Santilli
ces.html >From 9bba783d6581bc445b8a24fc8e615969fc16ab90 Mon Sep 17 00:00:00 2001 From: Sandro Santilli <s...@keybit.net> Date: Fri, 23 Oct 2015 12:00:51 +0200 Subject: [PATCH] Add extensions_path GUC --- src/backend/commands/extension.c | 37 ++--- src/backend/ut

Re: [HACKERS] PGXS check target forcing an install ?

2015-06-23 Thread Sandro Santilli
On Tue, Jun 23, 2015 at 02:31:03PM +0900, Michael Paquier wrote: On Tue, Jun 23, 2015 at 12:11 AM, Sandro Santilli s...@keybit.net wrote: I've noted that upgrading from PostgreSQL 9.3 to 9.5 I'm suddenly unable to specify a check rule in the Makefile that includes the PGXS one. The error

[HACKERS] Memory context at PG_init call ?

2015-06-23 Thread Sandro Santilli
Empirically, I seem to be getting the _PG_init call for a module while the active memory context lifetime is that of the function call which first needed to load the shared object. Is this the case ? Documented anywhere ? Initializing memory meant to be alive for the whole lifetime of a backend

[HACKERS] PGXS check target forcing an install ?

2015-06-22 Thread Sandro Santilli
I've noted that upgrading from PostgreSQL 9.3 to 9.5 I'm suddenly unable to specify a check rule in the Makefile that includes the PGXS one. The error is: $ make check rm -rf ''/tmp_install make -C '/home/postgresql-9.5/lib/pgxs/src/makefiles/../..' DESTDIR=''/tmp_install install make[1]:

Re: [HACKERS] Unexpected speed PLAIN vs. MAIN

2015-05-05 Thread Sandro Santilli
On Mon, May 04, 2015 at 01:50:45PM -0400, Tom Lane wrote: Sandro Santilli s...@keybit.net writes: I'm comparing speed of some queries against tables having the same data but different storage, and got an unexpected behavior. The tables have 2 integer fields and a PcPatch field (p

[HACKERS] Unexpected speed PLAIN vs. MAIN

2015-05-04 Thread Sandro Santilli
I'm comparing speed of some queries against tables having the same data but different storage, and got an unexpected behavior. The tables have 2 integer fields and a PcPatch field (p, custom type from pgPointCloud). There are no TOASTs involved (the toast table associated with the table with

[HACKERS] contraints_exclusion fails to refute simple condition

2015-03-05 Thread Sandro Santilli
PostGIS installs standard constraints of this kind: CHECK (geometrytype(g) = 'POINT'::text OR g IS NULL) The constraint is used by constraint_exclusion if using this condition: WHERE g IS NOT NULL AND geometrytype(g) = 'LINESTRING' But it is _NOT_ used if the NOT NULL condition is removed:

Re: [HACKERS] postgres_fdw and connection management

2014-05-27 Thread Sandro Santilli
On Tue, May 27, 2014 at 12:32:50AM -0300, Fabrízio de Royes Mello wrote: On Mon, May 26, 2014 at 11:47 PM, Shigeru Hanada shigeru.han...@gmail.com wrote: 2014-05-24 0:09 GMT+09:00 Sandro Santilli s...@keybit.net: Indeed I tried DISCARD ALL in hope it would have helped, so I find good

[HACKERS] postgres_fdw and connection management

2014-05-23 Thread Sandro Santilli
I'm evaluating use of the postgres FDW to keep in sync a central database to changes made in thousand other databases, via triggers. But as long as postgres_fdw keeps connections open for the whole lifetime of a session this conflicts with large use of poolers which make sessions virtually never

Re: [HACKERS] postgres_fdw and connection management

2014-05-23 Thread Sandro Santilli
On Fri, May 23, 2014 at 11:13:50AM -0300, Fabrízio de Royes Mello wrote: On Fri, May 23, 2014 at 8:09 AM, Sandro Santilli s...@keybit.net wrote: I'm evaluating use of the postgres FDW to keep in sync a central database to changes made in thousand other databases, via triggers

Re: [HACKERS] Uninterruptable regexp_replace in 9.3.1 ?

2014-02-26 Thread Sandro Santilli
On Fri, Feb 21, 2014 at 08:17:36PM -0500, Tom Lane wrote: I wrote: Craig Ringer cr...@2ndquadrant.com writes: So I'd like to confirm that this issue doesn't affect 9.1. It doesn't. I suspect it has something to do with 173e29aa5 or one of the nearby commits in backend/regex/.

[HACKERS] Uninterruptable regexp_replace in 9.3.1 ?

2014-02-21 Thread Sandro Santilli
The following snippet reveals that 9.3.1 has a bug in regexp_matches, which uninterruptably keeps CPU spinning for minutes: -8--- \timing SET statement_timeout = 2; -- this is only to show statement_timeout is effective here SELECT count(*)

Re: [HACKERS] Uninterruptable regexp_replace in 9.3.1 ?

2014-02-21 Thread Sandro Santilli
I've just tested 9.3.3 and it is _also_ affected. Should I report the regression somewhere else ? --strk; On Fri, Feb 21, 2014 at 10:17:59AM +0100, Sandro Santilli wrote: The following snippet reveals that 9.3.1 has a bug in regexp_matches, which uninterruptably keeps CPU spinning

Re: [HACKERS] Interrupting long external library calls

2012-06-07 Thread Sandro Santilli
On Sat, May 26, 2012 at 01:24:26PM +0200, Florian Pflug wrote: On May26, 2012, at 12:40 , Simon Riggs wrote: On 25 May 2012 17:34, Tom Lane t...@sss.pgh.pa.us wrote: I assume that the geos::util::Interrupt::request() call sets a flag somewhere that's going to be periodically checked in

Re: [HACKERS] Interrupting long external library calls

2012-06-07 Thread Sandro Santilli
On Thu, Jun 07, 2012 at 12:00:09PM +0200, Florian Pflug wrote: On Jun7, 2012, at 10:20 , Sandro Santilli wrote: In that case I can understand Tom's advice about providing a callback, and then I would only need to perform the events flushing part of from within the callback, and only

Re: [HACKERS] Interrupting long external library calls

2012-06-06 Thread Sandro Santilli
28, 2012 at 08:48:21AM +0200, Sandro Santilli wrote: On Fri, May 25, 2012 at 12:34:54PM -0400, Tom Lane wrote: Sandro Santilli s...@keybit.net writes: I ended up providing an explicit mechanism to request interruption of whatever the library is doing, and experimented (successfully so far

Re: [HACKERS] Interrupting long external library calls

2012-05-28 Thread Sandro Santilli
On Fri, May 25, 2012 at 12:34:54PM -0400, Tom Lane wrote: Sandro Santilli s...@keybit.net writes: I ended up providing an explicit mechanism to request interruption of whatever the library is doing, and experimented (successfully so far) requesting the interruption from a SIGINT handler

Re: [HACKERS] Interrupting long external library calls

2012-05-25 Thread Sandro Santilli
On Thu, May 24, 2012 at 04:37:04PM +0200, Florian Pflug wrote: On May24, 2012, at 15:04 , Sandro Santilli wrote: On Wed, May 16, 2012 at 07:30:03PM +0300, Heikki Linnakangas wrote: On 16.05.2012 15:42, Sandro Santilli wrote: But CHECK_FOR_INTERRUPTS doesn't return, right

Re: [HACKERS] Interrupting long external library calls

2012-05-24 Thread Sandro Santilli
On Wed, May 16, 2012 at 07:30:03PM +0300, Heikki Linnakangas wrote: On 16.05.2012 15:42, Sandro Santilli wrote: But CHECK_FOR_INTERRUPTS doesn't return, right ? Is there another macro for just checking w/out yet acting upon it ? Hmm, no. CHECK_FOR_INTERRUPTS() checks the InterruptPending

Re: [HACKERS] Interrupting long external library calls

2012-05-24 Thread Sandro Santilli
On Thu, May 24, 2012 at 04:55:34PM +0300, Heikki Linnakangas wrote: On 24.05.2012 16:04, Sandro Santilli wrote: On Wed, May 16, 2012 at 07:30:03PM +0300, Heikki Linnakangas wrote: On 16.05.2012 15:42, Sandro Santilli wrote: But CHECK_FOR_INTERRUPTS doesn't return, right ? Is there another

Re: [HACKERS] Interrupting long external library calls

2012-05-16 Thread Sandro Santilli
On Wed, May 16, 2012 at 02:46:17PM +0300, Heikki Linnakangas wrote: On 16.05.2012 14:30, Mark Cave-Ayland wrote: On 16/05/12 11:39, Heikki Linnakangas wrote: However, if you're absolutely positively sure that the library function can tolerate that, you can set ImmediateInterruptOK = true

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-05-11 Thread Sandro Santilli
On Thu, May 10, 2012 at 02:30:35PM -0400, Robert Haas wrote: On Thu, May 10, 2012 at 2:07 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Ants Aasma a...@cybertec.at wrote: It seems to me that the simplest thing to do would be to lift the sampling done in analyze.c

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-24 Thread Sandro Santilli
On Mon, Apr 23, 2012 at 08:34:44PM +0300, Ants Aasma wrote: On Mon, Apr 23, 2012 at 4:37 PM, Sandro Santilli s...@keybit.net wrote: I'd love to see enhanced CTID operators, to fetch all visible tuples in a page using a tidscan.  Something like: WHERE ctid =~ '(501,*)' or a ctidrange

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-24 Thread Sandro Santilli
On Tue, Apr 24, 2012 at 08:49:26AM +0200, Sandro Santilli wrote: On Mon, Apr 23, 2012 at 08:34:44PM +0300, Ants Aasma wrote: SELECT (SELECT reservoir_sample(some_table, 50) AS samples FROM some_table WHERE ctid =~ ANY (rnd_pgtids)) FROM random_pages('some_table', 50) AS rnd_pgtids

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-23 Thread Sandro Santilli
On Sat, Apr 21, 2012 at 02:28:52PM +0800, Qi Huang wrote: Hi, Heikki ... Another idea that Robert Haas suggested was to add support doing a TID scan for a query like WHERE ctid '(501,1)'. That's not enough work for GSoC project on its own, but could certainly be a part of it. the

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-19 Thread Sandro Santilli
On Tue, Apr 17, 2012 at 04:29:52PM -0400, Stephen Frost wrote: Josh, * Josh Berkus (j...@agliodbs.com) wrote: FWIW, the PostGIS folks would *really* love to have a TABLESAMPLE which worked with geographic indexes. This would be tremendously useful for constructing low-resolution zoom

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-19 Thread Sandro Santilli
On Mon, 16 Apr 2012 23:17:25 -0700, Heikki Linnakangas wrote: 1. We probably don't want the SQL syntax to be added to the grammar. This should be written as an extension, using custom functions as the API, instead of extra SQL syntax. I can't find the discussion about this, have any

Re: [HACKERS] Gsoc2012 idea, tablesample

2012-04-19 Thread Sandro Santilli
On Thu, Apr 19, 2012 at 08:47:51AM -0400, Stephen Frost wrote: * Sandro Santilli (s...@keybit.net) wrote: Actually a random sample would really be representative of the data distribution. What the type analyzer gets is a sample and that sample is what the estimator looks at to answer

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-27 Thread Sandro Santilli
On Fri, Feb 24, 2012 at 08:21:05PM +0200, Peter Eisentraut wrote: On fre, 2012-02-24 at 17:26 +0100, Sandro Santilli wrote: We don't initdb with PostGIS regression testing framework but I've considered doing it for this specific case and it stroke me that even then we couldn't control

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-27 Thread Sandro Santilli
On Sun, Feb 26, 2012 at 09:50:04PM -0500, Robert Haas wrote: On Sun, Feb 26, 2012 at 10:36 AM, Peter Eisentraut pete...@gmx.net wrote: On lör, 2012-02-25 at 14:21 +0100, Christoph Berg wrote: Well, I'm trying to invoke the extension's make check target at extension build time. I do have a

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-24 Thread Sandro Santilli
On Fri, Feb 24, 2012 at 09:59:12AM +0100, Christoph Berg wrote: Re: Sandro Santilli 2012-02-22 20120222101656.GB6125@gnash I'm not really looking for inline extensions. I do want to install the extension objects somewhere, just NOT in the PostgreSQL builtin SHAREDIR but in an arbitrary

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-24 Thread Sandro Santilli
On Thu, Feb 23, 2012 at 06:53:05PM -0800, Daniel Farina wrote: On Tue, Feb 21, 2012 at 1:34 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Sandro Santilli s...@keybit.net writes: Please see the inline extension thread where answers to your problem have been discussed. I'm pretty

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-22 Thread Sandro Santilli
On Tue, Feb 21, 2012 at 10:34:42PM +0100, Dimitri Fontaine wrote: Sandro Santilli s...@keybit.net writes: On Tue, Feb 21, 2012 at 10:21:17AM -0500, Tom Lane wrote: Sandro Santilli s...@keybit.net writes: I'm trying to understand what options I have to test CREATE EXTENSION w/out

[HACKERS] [PATCH] typo fix

2012-02-22 Thread Sandro Santilli
Typo in a comment... --strk; From cfca9507df8612a48cad341653f8e9193c6b7e08 Mon Sep 17 00:00:00 2001 From: Sandro Santilli s...@keybit.net Date: Wed, 22 Feb 2012 11:32:48 +0100 Subject: [PATCH] typo fix --- src/backend/commands/extension.c |2 +- 1 files changed, 1 insertions(+), 1

[HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-21 Thread Sandro Santilli
I'm trying to understand what options I have to test CREATE EXTENSION w/out installing the extension files in their final destination. Could not find a way to set SHAREDIR from within psql, nor a way to specify it in initdb call. Am I missing it something ? PS: please include my address in

Re: [HACKERS] Runtime SHAREDIR for testing CREATE EXTENSION

2012-02-21 Thread Sandro Santilli
On Tue, Feb 21, 2012 at 10:21:17AM -0500, Tom Lane wrote: Sandro Santilli s...@keybit.net writes: I'm trying to understand what options I have to test CREATE EXTENSION w/out installing the extension files in their final destination. There aren't any. Generally speaking, if you want

[HACKERS] CASE w/out ELSE hides typmod (was: How define a view that use a case operator for geometry field)

2011-10-28 Thread Sandro Santilli
On Fri, Oct 28, 2011 at 10:33:45PM +0200, aperi2007 wrote: Seem that postgis try to define it an else condition assigning it a unknown geometry ? It's PostgreSQL, not PostGIS. The same happens with any type, can be reproduced with something like this: =# CREATE VIEW test1 AS SELECT CASE