Re: Early Look: PostgreSQL 9.3 beta 1

2013-10-10 Thread Jeremy Evans
Here's a diff to build skytools with PostgreSQL 9.3.  Compile tested
only.

Jeremy

Index: Makefile
===
RCS file: /cvs/ports/databases/skytools/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile11 Mar 2013 02:52:08 -  1.19
+++ Makefile10 Oct 2013 19:50:04 -
@@ -4,6 +4,7 @@ COMMENT=PostgreSQL tools from Skype
 
 MODPY_EGG_VERSION= 3.1.1
 DISTNAME=  skytools-${MODPY_EGG_VERSION}
+REVISION=  0
 
 CATEGORIES=databases
 
Index: patches/patch-sql_pgq_triggers_qbuilder_c
===
RCS file: patches/patch-sql_pgq_triggers_qbuilder_c
diff -N patches/patch-sql_pgq_triggers_qbuilder_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-sql_pgq_triggers_qbuilder_c   10 Oct 2013 19:49:26 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Work with PostgreSQL 9.3.
+
+--- sql/pgq/triggers/qbuilder.c.orig   Thu Oct 10 12:48:03 2013
 sql/pgq/triggers/qbuilder.cThu Oct 10 12:48:21 2013
+@@ -1,6 +1,7 @@
+ 
+ #include postgres.h
+ #include executor/spi.h
++#include lib/stringinfo.h
+ 
+ #include qbuilder.h
+ #include parsesql.h



Re: Early Look: PostgreSQL 9.3 beta 1

2013-10-06 Thread Landry Breuil
On Thu, Oct 03, 2013 at 01:21:46PM -0700, Jeremy Evans wrote:
 On 10/01 03:38, Pierre-Emmanuel Andr?? wrote:
  On Fri, 27 Sep 2013 16:02:05 +0200, Martin Pelikan wrote:
  Here's a diff against -current for 9.3 beta2. I've made some PLIST
  
  Here's a diff agains -current for 9.3.0.  No changes apart from
  version,
  size and SHA256 bump.  Seems to work on amd64.
  
  Any idea when might this go in?  Thanks!
  
  
  I'm ok with this diff but i would like to have the result of a bulk
  build with it.
  Landry, could you launch a bulk build please ?
  
  Regards,
 
 Here are patches for plv8 and pllua to work with PostgreSQL 9.3:

This fixes them, only remaining breakage being skytools.

Landry



Re: Early Look: PostgreSQL 9.3 beta 1

2013-10-03 Thread Landry Breuil
On Tue, Oct 01, 2013 at 03:38:25PM +0200, Pierre-Emmanuel André wrote:
 On Fri, 27 Sep 2013 16:02:05 +0200, Martin Pelikan wrote:
 Here's a diff against -current for 9.3 beta2. I've made some PLIST
 
 Here's a diff agains -current for 9.3.0.  No changes apart from
 version,
 size and SHA256 bump.  Seems to work on amd64.
 
 Any idea when might this go in?  Thanks!
 
 
 I'm ok with this diff but i would like to have the result of a bulk
 build with it.
 Landry, could you launch a bulk build please ?

Fallout:
databases/skytools:
In file included from qbuilder.c:5:
qbuilder.h:20: error: expected specifier-qualifier-list before 'StringInfoData'
qbuilder.c: In function 'qb_create':
qbuilder.c:24: error: 'struct QueryBuilder' has no member named 'op'

databases/postgresql-plv8  databases/postgresql-pllua:
=== postgresql-plv8-1.3.0p0 depends on: postgresql-server-=9.2,9.3 - not 
found

Landry



Re: Early Look: PostgreSQL 9.3 beta 1

2013-10-03 Thread Jeremy Evans
On 10/01 03:38, Pierre-Emmanuel Andr?? wrote:
 On Fri, 27 Sep 2013 16:02:05 +0200, Martin Pelikan wrote:
 Here's a diff against -current for 9.3 beta2. I've made some PLIST
 
 Here's a diff agains -current for 9.3.0.  No changes apart from
 version,
 size and SHA256 bump.  Seems to work on amd64.
 
 Any idea when might this go in?  Thanks!
 
 
 I'm ok with this diff but i would like to have the result of a bulk
 build with it.
 Landry, could you launch a bulk build please ?
 
 Regards,

Here are patches for plv8 and pllua to work with PostgreSQL 9.3:

Index: Makefile
===
RCS file: /cvs/ports/databases/postgresql-plv8/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile7 Aug 2013 21:31:23 -   1.3
+++ Makefile3 Oct 2013 19:41:12 -
@@ -7,7 +7,7 @@ COMMENT =   PostgreSQL V8 javascript proc
 
 VERSION =  1.3.0
 DISTNAME = plv8-${VERSION}
-REVISION = 0
+REVISION = 1
 PKGNAME =  postgresql-${DISTNAME}
 
 CATEGORIES =   databases
@@ -26,7 +26,7 @@ EXTRACT_SUFX =.zip
 
 BUILD_DEPENDS =${RUN_DEPENDS}
 LIB_DEPENDS =  lang/libv8
-RUN_DEPENDS =  
postgresql-server-=9.2,9.3:databases/postgresql,-server
+RUN_DEPENDS =  
postgresql-server-=9.3,9.4:databases/postgresql,-server
 
 MAKE_FLAGS =   V8DIR=${LOCALBASE}/lib
 USE_GMAKE =Yes

Index: Makefile
===
RCS file: /cvs/ports/databases/postgresql-pllua/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile11 Mar 2013 02:52:07 -  1.3
+++ Makefile3 Oct 2013 20:03:43 -
@@ -4,7 +4,7 @@ SHARED_ONLY =   Yes
 
 COMMENT =  Lua procedural language support for PostgreSQL
 
-VERSION =  0.3.2
+VERSION =  1.0
 DISTNAME = pllua-${VERSION}
 PKGNAME =  postgresql-pllua-${VERSION}
 
@@ -19,14 +19,15 @@ PERMIT_PACKAGE_CDROM =  Yes
 
 WANTLIB =  c ${MODLUA_WANTLIB}
 
-MASTER_SITES = http://pgfoundry.org/frs/download.php/2401/
+MASTER_SITES = http://pgfoundry.org/frs/download.php/3481/
 
 MODULES =  lang/lua
 BUILD_DEPENDS =${RUN_DEPENDS}
-RUN_DEPENDS =  
postgresql-server-=9.2,9.3:databases/postgresql,-server
+RUN_DEPENDS =  
postgresql-server-=9.3,9.4:databases/postgresql,-server
 
 USE_GMAKE =Yes
 
+WRKDIST =  ${WRKDIR}/pllua-0.3.2
 SUBST_VARS =   MODLUA_INCL_DIR MODLUA_WANTLIB
 
 pre-configure:
Index: distinfo
===
RCS file: /cvs/ports/databases/postgresql-pllua/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo10 Oct 2012 10:41:36 -  1.1.1.1
+++ distinfo3 Oct 2013 20:02:11 -
@@ -1,2 +1,2 @@
-SHA256 (pllua-0.3.2.tar.gz) = ThEbqnpiwvVXZ6eNMCg67Tj3poWEJGh5NgYiYuC6p0I=
-SIZE (pllua-0.3.2.tar.gz) = 31324
+SHA256 (pllua-1.0.tar.gz) = ThEbqnpiwvVXZ6eNMCg67Tj3poWEJGh5NgYiYuC6p0I=
+SIZE (pllua-1.0.tar.gz) = 31324
Index: patches/patch-pllua_h
===
RCS file: /cvs/ports/databases/postgresql-pllua/patches/patch-pllua_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-pllua_h
--- patches/patch-pllua_h   10 Oct 2012 10:41:36 -  1.1.1.1
+++ patches/patch-pllua_h   3 Oct 2013 20:17:45 -
@@ -3,9 +3,17 @@ $OpenBSD: patch-pllua_h,v 1.1.1.1 2012/1
 Recent versions of PostgreSQL require an extra header to get the
 Relation struct defintion, and pllua hasn't been updated recently.
 
 pllua.h.orig   Tue Oct  9 17:32:18 2012
-+++ pllua.hTue Oct  9 17:32:27 2012
-@@ -25,6 +25,7 @@
+--- pllua.h.orig   Sun Sep 20 07:22:21 2009
 pllua.hThu Oct  3 13:17:41 2013
+@@ -11,6 +11,7 @@
+ #include fmgr.h
+ #include funcapi.h
+ #include access/heapam.h
++#include access/htup_details.h
+ #include catalog/namespace.h
+ #include catalog/pg_proc.h
+ #include catalog/pg_type.h
+@@ -25,6 +26,7 @@
  #include utils/datum.h
  #include utils/builtins.h
  #include utils/array.h
Index: patches/patch-plluaapi_c
===
RCS file: patches/patch-plluaapi_c
diff -N patches/patch-plluaapi_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-plluaapi_c3 Oct 2013 20:11:36 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- plluaapi.c.origThu Oct  3 13:09:19 2013
 plluaapi.c Thu Oct  3 13:09:56 2013
+@@ -22,7 +22,7 @@ typedef struct luaP_Info {
+ /* extended type info */
+ typedef struct luaP_Typeinfo {
+   int oid;
+-  int2 len;
++  int16 len;
+   char type;
+   char align;
+   bool byval;



Re: Early Look: PostgreSQL 9.3 beta 1

2013-10-01 Thread Pierre-Emmanuel André

On Fri, 27 Sep 2013 16:02:05 +0200, Martin Pelikan wrote:

Here's a diff against -current for 9.3 beta2. I've made some PLIST


Here's a diff agains -current for 9.3.0.  No changes apart from 
version,

size and SHA256 bump.  Seems to work on amd64.

Any idea when might this go in?  Thanks!



I'm ok with this diff but i would like to have the result of a bulk 
build with it.

Landry, could you launch a bulk build please ?

Regards,



Re: Early Look: PostgreSQL 9.3 beta 1

2013-10-01 Thread Jeremy Evans
On 10/01 03:38, Pierre-Emmanuel Andr?? wrote:
 On Fri, 27 Sep 2013 16:02:05 +0200, Martin Pelikan wrote:
 Here's a diff against -current for 9.3 beta2. I've made some PLIST
 
 Here's a diff agains -current for 9.3.0.  No changes apart from
 version,
 size and SHA256 bump.  Seems to work on amd64.
 
 Any idea when might this go in?  Thanks!
 
 
 I'm ok with this diff but i would like to have the result of a bulk
 build with it.
 Landry, could you launch a bulk build please ?

This looks good, though it appears to be missing a couple of new files
in PLIST-docs:

share/doc/postgresql/html/event-trigger-example.html
share/doc/postgresql/html/event-trigger-interface.html

I've been running PostgreSQL 9.3 on a couple of machines going from
beta1 - beta2 - rc1, and haven't had any regressions.

We definitely need a bulk before we can commit this, though.

Thanks,
Jeremy



Re: Early Look: PostgreSQL 9.3 beta 1

2013-06-28 Thread Eric Radman
On Thu, Jun 27, 2013 at 03:08:55PM -0700, Jeremy Evans wrote:
 
 Here's a diff against -current for 9.3 beta2. I've made some PLIST
 changes so that libs for contrib modules are in the contrib package
 instead of the server package, and fixed an issue in the 9.3beta1 diff
 where a new header file was added to the server package instead of the
 client package.

Very nice! The major extensions just work out of the box

# SELECT * FROM pg_extension;
  extname  | extowner | extnamespace | extrelocatable | extversion | extconfig 
| extcondition 
---+--+--+++---+--
 plpgsql   |   10 |   11 | f  | 1.0|   
| 
 plpythonu |16432 |   11 | f  | 1.0|   
| 
 hstore|16432 | 2200 | t  | 1.1|   
| 
 uuid-ossp | 

Since 9.3 doesn't depend on SysV shared memory, we can simplify
README-server a bit, and maybe suggest a command for changing the login
class

--- README-server   Fri Jun 28 19:42:44 2013
+++ README-server.new   Fri Jun 28 19:42:53 2013
@@ -67,22 +67,10 @@
 
 Tuning for busy servers
 ===
-The default sizes in the GENERIC kernel for SysV semaphores are only
-just large enough for a database with the default configuration
-(max_connections 40) if no other running processes use semaphores.
-In other cases you will need to increase the limits. Adding the
-following in /etc/sysctl.conf will be reasonable for many systems:
 
-   kern.seminfo.semmni=60
-   kern.seminfo.semmns=1024
+Adjust the value of max_connections in postgresql.conf to support more
+than 40 connections.
 
-To serve a large number of connections (250), you may need higher
-values for the above.
-
-You may also want to tune the max_connect value in the
-postgresql.conf file to increase the number of connections to the
-backend.
-
 By default, the _postgresql user, and so the postmaster and backend
 processes run in the login(1) class of daemon. On a busy server,
 it may be advisable to put the _postgresql user and processes in
@@ -98,6 +86,10 @@
 Rebuild the login.conf.db file if necessary:
 
# [ -f /etc/login.conf.db ]  cap_mkdb /etc/login.conf
+
+Then change the login class using
+
+   # usermod -L postgresql _postgresql
 
 For more than about 250 connections, these numbers should be
 increased. Please report any changes and experiences to the package



Re: Early Look: PostgreSQL 9.3 beta 1

2013-06-28 Thread Jeremy Evans
On 06/28 07:49, Eric Radman wrote:
 Since 9.3 doesn't depend on SysV shared memory, we can simplify
 README-server a bit

Are you sure the changes to SysV shared memory affect the SysV
semaphore situation?  I already modified the README for the SysV shared
memory differences. Comparing the following two pages:

http://www.postgresql.org/docs/9.2/static/kernel-resources.html
http://www.postgresql.org/docs/9.3/static/kernel-resources.html

It looks like the semaphore situation hasn't changed.
 
 --- README-server Fri Jun 28 19:42:44 2013
 +++ README-server.new Fri Jun 28 19:42:53 2013
 @@ -67,22 +67,10 @@
  
  Tuning for busy servers
  ===
 -The default sizes in the GENERIC kernel for SysV semaphores are only
 -just large enough for a database with the default configuration
 -(max_connections 40) if no other running processes use semaphores.
 -In other cases you will need to increase the limits. Adding the
 -following in /etc/sysctl.conf will be reasonable for many systems:
  
 - kern.seminfo.semmni=60
 - kern.seminfo.semmns=1024
 +Adjust the value of max_connections in postgresql.conf to support more
 +than 40 connections.
  
 -To serve a large number of connections (250), you may need higher
 -values for the above.
 -
 -You may also want to tune the max_connect value in the
 -postgresql.conf file to increase the number of connections to the
 -backend.
 -
  By default, the _postgresql user, and so the postmaster and backend
  processes run in the login(1) class of daemon. On a busy server,
  it may be advisable to put the _postgresql user and processes in
 @@ -98,6 +86,10 @@
  Rebuild the login.conf.db file if necessary:
  
   # [ -f /etc/login.conf.db ]  cap_mkdb /etc/login.conf
 +
 +Then change the login class using
 +
 + # usermod -L postgresql _postgresql

This isn't necessary or recommended in other pkg-readmes AFAIK. rc.d
uses a login class of postgresql automatically if login.conf includes
an entry for it.  If this change is recommended for PostgreSQL, it
should probably be done consistently with other similar software.
I leave that decision to more experienced porters.

Thanks,
Jeremy



Re: Early Look: PostgreSQL 9.3 beta 1

2013-06-28 Thread Eric Radman
On Fri, Jun 28, 2013 at 05:25:57PM -0700, Jeremy Evans wrote:
 On 06/28 07:49, Eric Radman wrote:
  Since 9.3 doesn't depend on SysV shared memory, we can simplify
  README-server a bit
 
 Are you sure the changes to SysV shared memory affect the SysV
 semaphore situation?  I already modified the README for the SysV shared
 memory differences. Comparing the following two pages:
 
 http://www.postgresql.org/docs/9.2/static/kernel-resources.html
 http://www.postgresql.org/docs/9.3/static/kernel-resources.html
 
 It looks like the semaphore situation hasn't changed.

Sorry, you are correct. I hadn't read the release notes carefully, and if I
crank up max_connections the error log is informative

FATAL:  could not create semaphores: No space left on device
DETAIL:  Failed system call was semget(5432004, 17, 03600).
HINT:  This error does *not* mean that you have run out of disk space.  It 
occurs when either the system limit for the maximum number of semaphore sets 
(SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be 
exceeded.  You need to raise the respective kernel parameter.  Alternatively, 
reduce PostgreSQL's consumption of semaphores by reducing its max_connections 
parameter.



Re: Early Look: PostgreSQL 9.3 beta 1

2013-05-16 Thread Stuart Henderson
On 2013/05/16 17:22, Jeremy Evans wrote:
 Note that this diff also enables plpython support,

Would it make sense to link the main program with -lpthread?



Re: Early Look: PostgreSQL 9.3 beta 1

2013-05-16 Thread Jeremy Evans
On 05/17 01:42, Stuart Henderson wrote:
 On 2013/05/16 17:22, Jeremy Evans wrote:
  Note that this diff also enables plpython support,
 
 Would it make sense to link the main program with -lpthread?

I'm not against it, but it's really the maintainer's (pea's) decision.
It would eliminate the hacks you need to use to get certain procedural
languages to run.  AFAIK, there are no longer significant downsides to
it.

Jeremy