[GENERAL] View 'instead of' update row with new object

2015-01-08 Thread Tom Dearman
I am partitioning a number of tables in our system and am using a view on the 
real master table with 'instead of’ triggers to insert and update rows.  I have 
used a view because my application uses Hibernate which does not work well with 
triggers that return a null to indicate no further processing (Hibernate will 
interpret this as 0 inserts/updates).  This all works well but when using the 
‘instead of’ trigger, when a column value is changed, I must write a big clause 
with multiple 'set columnName = NEW.columnName’.  I am also generating the 
scripts for all tables with a generic generator and since the tables have 
different columns this part of the script must be table specific.  Is there any 
way to do something like update tableName * = New.  Or would there be a cost to 
deleting the row then inserting again - I have read that postgres does this 
anyway, but I assume it may do this in some efficient way which may not require 
index updates etc.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] BDR Error restarted

2015-01-08 Thread deans
Thanks Craig.

> How exactly do you restart the node?
Using "service postgresql-9.4 restart" command to do the service restart.

> Please show the full log line, not just an excerpt, along with the lines 
> around
it.
> If possible run with log_error_verbosity=verbose and show the extra line(s)
printed after each log line too, please.

See the full logs during the restart process on one node:
http://tny.cz/e1831e2a

Thanks,
Dean

On Wed, Jan 7, 2015 at 12:56 PM, Craig Ringer-3 [via PostgreSQL] <
ml-node+s1045698n5833173...@n5.nabble.com> wrote:

> On 01/07/2015 11:28 AM, deans wrote:
>
> > Hi Guys.
> >
> > First of all, BDR is cool, should have tried it earlier.
> >
> > Environment: CentOS 6.5, PostgreSQL 9.4.0 with BDR from yum repository
> >
> > Done the PostgreSQL 9.4 with BDR setup successfully by following the
> User
> > Guide and Admin Doc, but got a issue when tried to do postgresql service
> > restart on any of the cluster nodes, it always lost items in the
> relation
> > "pg_stat_replication"  after the service restarted
>
> It'd be weird if it didn't. That's not a table, it's a view over a
> function that reports server status information.
>
> It's like pg_stat_activity for replication.
>
> How exactly do you restart the node?
>
> > means lost replication
> > connections, like normally we have 26 items(13 databases and 3 servers
> in
> > cluster, so 13x2 items in pg_stat_replication on each node, yes, lots
> dbs on
> > one cluster), but after the restart, got some random count of item in
> the
> > relation, like 20, or 16 or 4, but not 26 as expected, i.e. not all the
> > replication connections running well.
>
> That's normal, in that it can take time for peers to notice and
> re-connect. This is true whether it's BDR, other logical replication, or
> conventional streaming replication.
>
> > And the logs showing replication is
> > "wait until the node has caught up", but they never catch up again.
>
> Please show the full log line, not just an excerpt, along with the lines
> around it.
>
> If possible run with log_error_verbosity=verbose and show the extra
> line(s) printed after each log line too, please.
>
> > BDR Settings(replaced the real db name here):
> > 1. on node 01, the replication src one:
> >
> > 2. on node 02, mostly like 03
>
> You forgot these.
>
> > Error logs:
>
> and these.
>
> --
>  Craig Ringer   http://www.2ndQuadrant.com/
>  PostgreSQL Development, 24x7 Support, Training & Services
>
>
> --
> Sent via pgsql-general mailing list ([hidden email]
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
> http://postgresql.nabble.com/BDR-Error-restarted-tp5833139p5833173.html
>  To unsubscribe from BDR Error restarted, click here
> 
> .
> NAML
> 
>



-- 
Thanks,
Dean.song




--
View this message in context: 
http://postgresql.nabble.com/BDR-Error-restarted-tp5833139p5833298.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

[GENERAL] partial text search

2015-01-08 Thread avpro avpro
> Hi,
>
> my task is to search partial text in the fields mentioned in query.
Basically I have to tables t1 and t2 and I need to search in t1 all the
codes returned by a query from t2. In t1 the values could be identical as
in t2 or could be partial. For example.
>
> T1:
>
> Description
>
> 190201 – is not our student
>
> 190202 – is …
>
> 190202
>
> T2:
>
> Description
>
> 190202
>
> My query should return for item “190202” from t2 all the columns where
this text is found in t1, but not necessary identical. The result will be
the last two rows from T1:
>
> 190202 – is …
>
> 190202
>
> I have tried something similar with the following:
>
> SELECT description FROM t1 WHERE description LIKE '195004'
>
> Instead of ‘195004’ I would like to put one by one all elements returned
by another query:
>
> SELECT description FROM t2
>
> Any idea how to do that?
>
> I was looking on the partial text search with tsvector and tsquery, but
I’m not sure how to put the queries should be something like this:
>
> SELECT to_tsvector(t1.description) @@ to_tsquery(SELECT description FROM
t2);
>
> Thank you.


Re: [GENERAL] Inconsistent bgworker behaviour

2015-01-08 Thread Beena Emerson
Hello,

Thank you for your reply.

> We could probably use a WaitForBackgroundWorkerTermination(...) to
> correspond to WaitForBackgroundWorkerStartup(...) .
>
> I think you'll probably want to GetBackgroundWorkerPid(...) and examine
> the returned BgwHandleStatus to see if it's BGWH_STOPPED . If not, keep
> waiting. You might want a timeout to re-check.

I have tried checking the status but I found that BGWH_STOPPED does not
imply that the background worker has unregistered.

I updated the code as suggested  to check the Handle status in a loop and
added appropriate LOG messages to understand the flow.

This is the log output. The old M.datatbases value was "db1, db4".

LOG:  received SIGHUP, reloading configuration files
LOG:  parameter "m.databases" changed to "db1, db2"
LOG:  WaitLatch Ends
LOG:  The bgworker status is BGWH_STOPPED
WARNING:  could not register background process for database "db2"
HINT:  You may need to increase configuration parameter
"max_worker_processes".
LOG:  worker process: m db4 (PID 8629) exited with exit code 0
LOG:  unregistering background worker "m db4"
server signaled

As seen even though the status is BGWH_STOPPED, the slot is not free and
hence the new worker cannot be launched.

Is there any way to check if the bgworker has unregistered and freed a slot?

Thanks,

Beena


Re: [GENERAL] How to monitor locks (max_pred_locks_per_transaction)?

2015-01-08 Thread Andrey Lizenko
Thanks for your detailed explanation, Kevin. I will check my system again
keeping SIReadLock in mind.

By the way, does max_locks_per_transaction limit all others modes of locks
by the same way?

On 7 January 2015 at 00:34, Kevin Grittner  wrote:

> Andrey Lizenko  wrote:
>
> >> 2014-12-28 14:33:23 GMT 553582643 24969 SELECT 53200 63/8298433
> 54a00a84.6189 1 %ERROR:  out of shared memory
> >> 2014-12-28 14:33:23 GMT 553582643 24969 SELECT 53200 63/8298433
> 54a00a84.6189 2 %HINT:  You might need to increase
> max_pred_locks_per_transaction.
> >
> > Is there any way to predict such OOM situation (to adjust
> > max_pred_locks_per_transaction before some transaction fails)?
> > As far as we have a lot of transaction in SERIALIZABLE isolation
> > level, should it be some counts of pg_locks with mode =
> > AccessExclusiveLock or something like that?
>
> WHERE mode = 'SIReadLock'
>
> > how can I get number of 'distinct objects' mentioned here?
>
> The total 'SIReadLock' count must be less than
> max_pred_locks_per_transaction * max_connections.
>
> The default is small so that minimal space is reserved for those
> not using serializable transactions.  Many people have found that
> they need to set it to 10 to 20 times the default values.
>
> Due to the heuristics of how multiple fine-grained locks are
> combined into coarser-grained locks it might sometimes be necessary
> (if you have a lot of page locks in a lot of tables) to raise
> max_connections beyond what you need for actual connections.  I
> have not actually seen this yet, but it could happen.  If it does,
> please share details of the workload and your settings, so that we
> can look at possible adjustments to the lock granularity promotion
> logic or the memory allocation techniques.
>
> Please note the suggestions on performance in the documentation of
> serializable transactions.  In particular, if a transaction will
> not be modifying data, setting it to READ ONLY can help a lot.  Not
> only will it help performance, but it will tend to reduce the
> number of predicate locks needed.
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Regards, Andrey Lizenko


[GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Jimmy Jack
Here is the snippet of the error, I am really puzzled why I cannot install 
postgres.


clang: error: unsupported option '-V -isystem/opt/boxen/homebrew/include'
clang: error: unknown argument: '-qversion’


any thoughts?
thanks a lot











This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.


It was created by PostgreSQL configure 9.4.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was


  $ ./configure --disable-debug 
--prefix=/opt/boxen/homebrew/Cellar/postgresql/9.4.0 
--datadir=/opt/boxen/homebrew/Cellar/postgresql/9.4.0/share/postgresql 
--docdir=/opt/boxen/homebrew/Cellar/postgresql/9.4.0/share/doc/postgresql 
--enable-thread-safety --with-bonjour --with-gssapi --with-ldap --with-openssl 
--with-pam --with-libxml --with-libxslt --with-tcl 
--with-tclconfig=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib
 --with-uuid=e2fs


## - ##
## Platform. ##
## - ##


hostname = Jiris-MacBook-Pro.local
uname -m = x86_64
uname -r = 14.1.0
uname -s = Darwin
uname -v = Darwin Kernel Version 14.1.0: Fri Dec  5 06:49:27 PST 2014; 
root:xnu-2782.10.67~9/RELEASE_X86_64


/usr/bin/uname -p = i386
/bin/uname -X     = unknown


/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
 Darwin Kernel Version 14.1.0: Fri Dec  5 06:49:27 PST 2014; 
root:xnu-2782.10.67~9/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 292 tasks, 1430 threads, 4 processors
Load average: 2.32, Mach factor: 1.67
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown


PATH: /opt/boxen/homebrew/Library/ENV/4.3
PATH: /opt/boxen/homebrew/opt/openssl/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin




## --- ##
## Core tests. ##
## --- ##


configure:2746: checking build system type
configure:2760: result: x86_64-apple-darwin14.1.0
configure:2780: checking host system type
configure:2793: result: x86_64-apple-darwin14.1.0
configure:2815: checking which template to use
configure:2886: result: darwin
configure:2981: checking whether to build with 64-bit integer date/time support
configure:3010: result: yes
configure:3017: checking whether NLS is wanted
configure:3049: result: no
configure:3057: checking for default port number
configure:3082: result: 5432
configure:3473: checking for block size
configure:3507: result: 8kB
configure:3519: checking for segment size
configure:3548: result: 1GB
configure:3560: checking for WAL block size
configure:3595: result: 8kB
configure:3607: checking for WAL segment size
configure:3642: result: 16MB
configure:3797: checking for C compiler version
configure:3806: clang --version >&5
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
configure:3817: $? = 0
configure:3806: clang -v >&5
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
configure:3817: $? = 0
configure:3806: clang -V >&5
clang: error: unsupported option '-V -isystem/opt/boxen/homebrew/include'
configure:3817: $? = 1
configure:3806: clang -qversion >&5
clang: error: unknown argument: '-qversion'
configure:3817: $? = 1
configure:3837: checking whether the C compiler works
configure:3859: clang    conftest.c  >&5
configure:3863: $? = 0
configure:3911: result: yes
configure:3914: checking for C compiler default output file name
configure:3916: result: a.out
configure:3922: checking for suffix of executables
configure:3929: clang -o conftest    conftest.c  >&5
configure:3933: $? = 0
configure:3955: result: 
configure:3977: checking whether we are cross compiling
configure:3985: clang -o conftest    conftest.c  >&5
configure:3989: $? = 0
configure:3996: ./conftest
configure:4000: $? = 0
configure:4015: result: no
configure:4020: checking for suffix of object files
configure:4042: clang -c   conftest.c >&5
configure:4046: $? = 0
configure:4067: result: o
configure:4071: checking whether we are using the GNU C compiler
configure:4090: clang -c   conftest.c >&5
configure:4090: $? = 0
configure:4099: result: yes
configure:4108: checking whether clang accepts -g
configure:4128: clang -c -g  conftest.c >&5
configure:4128: $? = 0
configure:4169: result: yes
configure:4186: checking for clang option to accept ISO C89
configure:4249: clang  -c -g -O2  conftest.c >&5
configure:4249: $? = 0
configure:4262: result: none needed
configure:4300: clang -c -g -O2  conftest.c >&5
conftest.c:23:1: error: use of undeclared identifier 'choke'
choke me
^
1 error generated.
configure:4300: $? =

Re: [GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Tom Lane
"Jimmy Jack"  writes:
> Here is the snippet of the error, I am really puzzled why I cannot install 
> postgres.
> clang: error: unsupported option '-V -isystem/opt/boxen/homebrew/include'
> clang: error: unknown argument: '-qversion’

The fragment of config.log you provided looks perfectly normal as far as
it goes (well, except that you seem to be using an unreleased version of
OS X...).  In particular, the error message you mention is completely
expected; whatever your problem is, this is not it.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Jimmy Jack
the log is really big, full of errors and ends with error 1












Undefined symbols for architecture x86_64:

  "_gethostbyname_r", referenced from:

      _main in conftest-7b666a.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

configure:12733: $? = 1

configure: failed program was:

On Thu, Jan 8, 2015 at 5:40 PM, Tom Lane  wrote:

> "Jimmy Jack"  writes:
>> Here is the snippet of the error, I am really puzzled why I cannot install 
>> postgres.
>> clang: error: unsupported option '-V -isystem/opt/boxen/homebrew/include'
>> clang: error: unknown argument: '-qversion’
> The fragment of config.log you provided looks perfectly normal as far as
> it goes (well, except that you seem to be using an unreleased version of
> OS X...).  In particular, the error message you mention is completely
> expected; whatever your problem is, this is not it.
>   regards, tom lane

Re: [GENERAL] How to exclude building/installing contrib modules on Windows

2015-01-08 Thread deepak
Thanks.

I tried putting all the modules under the contrib directory to the
exclude list.  Although I could compile, 3 of 153 regression tests
fail.  I have attached the regression.diffs file.

Maybe some contrib modules are absolutely needed?

--
Deepak

On Wed, Jan 7, 2015 at 6:19 PM, Michael Paquier 
wrote:

> On Thu, Jan 8, 2015 at 6:08 AM, deepak  wrote:
> > I would like to exclude building and installing contrib modules on
> Windows.
> >
> > Is there an easy way to do this?  I largely rely on the tools available
> in
> > src\tools\msvc to build using Visual Studio 2008.
> Have a look at @contrib_excludes at the top of Mkvcbuild.pm. All the
> contrib modules listed there will be ignored at build and install, so
> just update it according to your needs if you want to ignore one thing
> or another, including any custom thing you may have copied in the code
> tree.
> --
> Michael
>


regression.diffs
Description: Binary data

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Tom Lane
"Jimmy Jack"  writes:
> the log is really big, full of errors and ends with error 1
> Undefined symbols for architecture x86_64:
>   "_gethostbyname_r", referenced from:

That's expected too, on OS X.  There are *lots* of expected failures
in a configure run.

Please, if you're unable to identify where the actual problem is,
just post the whole config.log.

Or, if you just can't bring yourself to do that, the last hundred or so
lines before the section marker

##  ##
## Cache variables. ##
##  ##

might be sufficient information.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Jimmy Jack
I sent the message, it is pending review due its size… meanwhile there is the 
cache part




thanks a lot!








##  ##

## Cache variables. ##

##  ##




ac_cv_build=x86_64-apple-darwin14.1.0

ac_cv_c_bigendian=no

ac_cv_c_compiler_gnu=yes

ac_cv_c_flexmember=yes

ac_cv_c_inline=inline

ac_cv_env_CC_set=set

ac_cv_env_CC_value=clang

ac_cv_env_CFLAGS_set=

ac_cv_env_CFLAGS_value=

ac_cv_env_CPPFLAGS_set=

ac_cv_env_CPPFLAGS_value=

ac_cv_env_CPP_set=

ac_cv_env_CPP_value=

ac_cv_env_DOCBOOKSTYLE_set=

ac_cv_env_DOCBOOKSTYLE_value=

ac_cv_env_LDFLAGS_EX_set=

ac_cv_env_LDFLAGS_EX_value=

ac_cv_env_LDFLAGS_SL_set=

ac_cv_env_LDFLAGS_SL_value=

ac_cv_env_LDFLAGS_set=

ac_cv_env_LDFLAGS_value=

ac_cv_env_LIBS_set=

ac_cv_env_LIBS_value=

ac_cv_env_build_alias_set=

ac_cv_env_build_alias_value=

ac_cv_env_host_alias_set=

ac_cv_env_host_alias_value=

ac_cv_env_target_alias_set=

ac_cv_env_target_alias_value=

ac_cv_func_SSL_get_current_compression=yes

ac_cv_func_accept_arg1=int

ac_cv_func_accept_arg2='struct sockaddr *'

ac_cv_func_accept_arg3=socklen_t

ac_cv_func_accept_return=int

ac_cv_func_append_history=yes

ac_cv_func_cbrt=yes

ac_cv_func_crypt=yes

ac_cv_func_dlopen=yes

ac_cv_func_fdatasync=yes

ac_cv_func_fls=yes

ac_cv_func_fseeko=yes

ac_cv_func_getaddrinfo=yes

ac_cv_func_gethostbyname_r=no

ac_cv_func_getifaddrs=yes

ac_cv_func_getopt=yes

ac_cv_func_getopt_long=yes

ac_cv_func_getpeereid=yes

ac_cv_func_getpeerucred=no

ac_cv_func_getpwuid_r=yes

ac_cv_func_getrlimit=yes

ac_cv_func_getrusage=yes

ac_cv_func_history_truncate_file=yes

ac_cv_func_inet_aton=yes

ac_cv_func_isinf=yes

ac_cv_func_mbstowcs_l=yes

ac_cv_func_memmove=yes

ac_cv_func_mkdtemp=yes

ac_cv_func_poll=yes

ac_cv_func_posix_fadvise=no

ac_cv_func_pstat=no

ac_cv_func_random=yes

ac_cv_func_readlink=yes

ac_cv_func_rint=yes

ac_cv_func_rl_completion_matches=yes

ac_cv_func_rl_filename_completion_function=yes

ac_cv_func_setproctitle=no

ac_cv_func_setsid=yes

ac_cv_func_shm_open=yes

ac_cv_func_sigprocmask=yes

ac_cv_func_snprintf=yes

ac_cv_func_srandom=yes

ac_cv_func_strerror=yes

ac_cv_func_strerror_r=yes

ac_cv_func_strlcat=yes

ac_cv_func_strlcpy=yes

ac_cv_func_strtoll=yes

ac_cv_func_strtoull=yes

ac_cv_func_symlink=yes

ac_cv_func_sync_file_range=no

ac_cv_func_syslog=yes

ac_cv_func_towlower=yes

ac_cv_func_unsetenv=yes

ac_cv_func_utime=yes

ac_cv_func_utimes=yes

ac_cv_func_uuid_generate=yes

ac_cv_func_vsnprintf=yes

ac_cv_func_wcstombs=yes

ac_cv_func_wcstombs_l=yes

ac_cv_have_decl_F_FULLFSYNC=yes

ac_cv_have_decl_fdatasync=no

ac_cv_have_decl_posix_fadvise=no

ac_cv_have_decl_snprintf=yes

ac_cv_have_decl_strlcat=yes

ac_cv_have_decl_strlcpy=yes

ac_cv_have_decl_sys_siglist=yes

ac_cv_have_decl_vsnprintf=yes

ac_cv_header_crypt_h=no

ac_cv_header_dld_h=no

ac_cv_header_dns_sd_h=yes

ac_cv_header_fp_class_h=no

ac_cv_header_getopt_h=yes

ac_cv_header_gssapi_gssapi_h=yes

ac_cv_header_ieeefp_h=no

ac_cv_header_ifaddrs_h=yes

ac_cv_header_inttypes_h=yes

ac_cv_header_langinfo_h=yes

ac_cv_header_ldap_h=yes

ac_cv_header_libxml_parser_h=yes

ac_cv_header_libxslt_xslt_h=yes

ac_cv_header_memory_h=yes

ac_cv_header_net_if_h=yes

ac_cv_header_netinet_in_h=yes

ac_cv_header_netinet_tcp_h=yes

ac_cv_header_openssl_err_h=yes

ac_cv_header_openssl_ssl_h=yes

ac_cv_header_poll_h=yes

ac_cv_header_pthread_h=yes

ac_cv_header_pwd_h=yes

ac_cv_header_readline_history_h=yes

ac_cv_header_readline_readline_h=yes

ac_cv_header_security_pam_appl_h=yes

ac_cv_header_stdc=no

ac_cv_header_stdint_h=yes

ac_cv_header_stdlib_h=yes

ac_cv_header_string_h=yes

ac_cv_header_strings_h=yes

ac_cv_header_sys_ioctl_h=yes

ac_cv_header_sys_ipc_h=yes

ac_cv_header_sys_poll_h=yes

ac_cv_header_sys_pstat_h=no

ac_cv_header_sys_resource_h=yes

ac_cv_header_sys_select_h=yes

ac_cv_header_sys_sem_h=yes

ac_cv_header_sys_shm_h=yes

ac_cv_header_sys_socket_h=yes

ac_cv_header_sys_sockio_h=yes

ac_cv_header_sys_stat_h=yes

ac_cv_header_sys_tas_h=no

ac_cv_header_sys_time_h=yes

ac_cv_header_sys_types_h=yes

ac_cv_header_sys_ucred_h=yes

ac_cv_header_sys_un_h=yes

ac_cv_header_syslog_h=yes

ac_cv_header_termios_h=yes

ac_cv_header_ucred_h=no

ac_cv_header_unistd_h=yes

ac_cv_header_utime_h=yes

ac_cv_header_uuid_uuid_h=yes

ac_cv_header_wchar_h=yes

ac_cv_header_wctype_h=yes

ac_cv_header_zlib_h=yes

ac_cv_host=x86_64-apple-darwin14.1.0

ac_cv_lib_crypto_CRYPTO_new_ex_data=yes

ac_cv_lib_ldap_ldap_bind=yes

ac_cv_lib_ldap_r_ldap_simple_bind=yes

ac_cv_lib_m_main=yes

ac_cv_lib_pam_pam_start=yes

ac_cv_lib_ssl_SSL_library_init=yes

ac_cv_lib_xml2_xmlSaveToBuffer=yes

ac_cv_lib_xslt_xsltCleanupGlobals=yes

ac_cv_lib_z_inflate=yes

ac_cv_member_struct_sockaddr_sa_len=yes

ac_cv_member_struct_sockaddr_storage___ss_family=no

ac_cv_member_struct_sockaddr_storage___ss_len=no

ac_cv_member_struct_sockaddr_storage_ss_family=yes

ac_cv_member_struct_sockaddr_storage_ss_len=yes

ac_cv_member_struct_tm_tm_zone=yes

ac_cv_objex

Re: [GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Tom Lane
"Jimmy Jack"  writes:
> here it is, I apologize in advance for very large email

The problem is evidently here:

configure:12997: checking test program
configure:13007: clang -o conftest -O2 -Wall -Wmissing-prototypes 
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels 
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv  
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2
conftest.c -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline 
-lm  >&5
configure:13007: $? = 0
configure:13007: ./conftest
dyld: Library not loaded: 
/opt/boxen/homebrew/Cellar/openssl/1.0.1j/lib/libcrypto.1.0.0.dylib
  Referenced from: /opt/boxen/homebrew/opt/openssl/lib/libssl.1.0.0.dylib
  Reason: image not found
./configure: line 1928:  4124 Trace/BPT trap: 5   ./conftest$ac_exeext
configure:13007: $? = 133
configure: program exited with status 133
...
configure:13013: error: 
Could not execute a simple test program.  This may be a problem
related to locating shared libraries.  Check the file 'config.log'
for the exact reason.

There's evidently something pretty broken about your homebrew openssl
installation.  Remove that package, or reinstall it.

regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] How to exclude building/installing contrib modules on Windows

2015-01-08 Thread Michael Paquier
On Fri, Jan 9, 2015 at 11:00 AM, deepak  wrote:
> Thanks.
>
> I tried putting all the modules under the contrib directory to the
> exclude list.  Although I could compile, 3 of 153 regression tests
> fail.  I have attached the regression.diffs file.
Even Postgres HEAD has just 151 tests, aren't you using some fork?

> Maybe some contrib modules are absolutely needed?
Yes, some are: spi/ for autoinc.dll, dummy_seclabel/ for dummy_seclabel.dll.
-- 
Michael


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] GCC error while trying to install 9.4 via brew on MAC OS

2015-01-08 Thread Jimmy Jack
thank you so much! that solved my issue

On Thu, Jan 8, 2015 at 6:23 PM, Tom Lane  wrote:

> "Jimmy Jack"  writes:
>> here it is, I apologize in advance for very large email
> The problem is evidently here:
> configure:12997: checking test program
> configure:13007: clang -o conftest -O2 -Wall -Wmissing-prototypes 
> -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels 
> -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv  
> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2
> conftest.c -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz 
> -lreadline -lm  >&5
> configure:13007: $? = 0
> configure:13007: ./conftest
> dyld: Library not loaded: 
> /opt/boxen/homebrew/Cellar/openssl/1.0.1j/lib/libcrypto.1.0.0.dylib
>   Referenced from: /opt/boxen/homebrew/opt/openssl/lib/libssl.1.0.0.dylib
>   Reason: image not found
> ./configure: line 1928:  4124 Trace/BPT trap: 5   ./conftest$ac_exeext
> configure:13007: $? = 133
> configure: program exited with status 133
> ...
> configure:13013: error: 
> Could not execute a simple test program.  This may be a problem
> related to locating shared libraries.  Check the file 'config.log'
> for the exact reason.
> There's evidently something pretty broken about your homebrew openssl
> installation.  Remove that package, or reinstall it.
>   regards, tom lane

Re: [GENERAL] Inconsistent bgworker behaviour

2015-01-08 Thread Craig Ringer
On 01/09/2015 12:53 AM, Beena Emerson wrote:
> Is there any way to check if the bgworker has unregistered and freed a
> slot?

Not that I'm aware of. Anyone else have suggestions?

This is related to some other discussion we've had about needing a way
to enumerate bgworkers. The specific issue of finding out when a
bgworker is unregistered would fit under that.

-- 
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] PostgreSQL service account on Windows 7: Use a virtual account

2015-01-08 Thread Craig Ringer
On 09/17/2014 05:35 AM, Michael Paquier wrote:
> On Thu, Sep 11, 2014 at 10:25 PM, Craig Ringer  wrote:
>> The PostgreSQL installer now uses the NETWORKSERVICE account on Windows
>> by default (as of 9.2), instead of creating a "postgres" account with
>> username and password. Which is a big improvement to usability.
> Using NETWORKSERVICE is not cool as it is created by the system and
> may be shared by some other processes. I am not sure about the
> security implications but this sounds weird and should be avoided if
> possible.

(Resurrecting this discussion as I missed your reply)

Using NETWORK SERVICE is not ideal. Unfortunately, prior to Windows 7
the platform doesn't have a sane way to create service accounts. Users
are expected to create a service account with a password, know what that
password is, and be able to supply that password again when later
required by other installers.

The alternative, which I advocated in the past, is to generate a random
password to use as the service account password, and store that service
account password in the Registry using key only readable by the
Administrators group and SYSTEM user. So our installer(s) could read the
service account password when required and the user doesn't have to deal
with the WTFery of having a system "postgres" password that's different
to the postgres user account password. This is more secure than using
NETWORK SERVICE, not less, but I wasn't able to convince anyone that we
should do it.

Using NETWORK SERVICE is less bad than what we had before - and users
can still create a service account if they want, the default just
changed to one that won't cause endless install problems and confusion.

At this point I think we can just not care for older Windows versions
and focus on doing it right on Windows 7 and above, which has sensible
passwordless service accounts.
>> It may be worth adopting this when the installer detects a Windows 7 /
>> Win2k8 R2 or newer system - just create an account like:
>>
>> NT Service\PostgreSQL$EDB-9.4-x86
> By looking here:
> http://msdn.microsoft.com/en-us/library/windows/desktop/bb545671%28v=vs.85%29.aspx
> You'd need to be sure as well that there are necessary privileges in
> ALL SERVICES: at least SeServiceLogonRight and optionally
> SeNetworkLogonRight for network stuff. I guess that it is as well
> necessary to be careful about the platform version and to have a
> fallback mechanism to NETWORKSERVICE  if platform version is rather
> old (older than 6.1 for Win2k8 R2 and Win7?!) or if necessary
> privileges are not present but well you are aware of that already :)


-- 
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general