Re: [GENERAL] Because PostgreSQL is compiling in old versions of OS?

2017-11-10 Thread DrakoRod
Oh!! 


Jose Maria TJ wrote
> You're wrong, that are gcc versions, not OS versions.
> 
> For example in my CentOS 6 Box
> 
> cat /etc/redhat-release
> CentOS release 6.9 (Final)
> 
> gcc -v
> [...trimmed...]
> gcc versión 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

You're right!. Is the GGC version, not the OS version

Great! I think that I compiling in a GGC 4.X version is good for most SO
distribution right? 

Thanks! 




-
Dame un poco de fe, eso me bastará.
Rozvo Ware Solutions 
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


-- 
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] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Tom Lane
Adam Brusselback  writes:
>> You might want to increase pg_ctl's wait timeout for this situation,
>> since the default's evidently too little.  However ...

> Got it, thanks.

>> ... pg_ctl itself wouldn't decide to forcibly shut down the server
>> if the timeout expired.  It merely stops waiting and tells you so.
>> It seems like this must represent misdesign of whatever start script
>> you're using.  I think you need to complain to the Debian packagers
>> about that.

> Hmm, interesting.  I installed from this repo:
> http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
> I was assuming someone in the Postgres project was involved in
> packaging it.  Do you know who I should reach out to in that case?

Christoph's probably a good place to start.

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] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Joe Conway
On 11/10/2017 01:01 PM, Adam Brusselback wrote:
>> You might want to increase pg_ctl's wait timeout for this situation,
>> since the default's evidently too little.  However ...
> Got it, thanks.
> 
>> ... pg_ctl itself wouldn't decide to forcibly shut down the server
>> if the timeout expired.  It merely stops waiting and tells you so.
>> It seems like this must represent misdesign of whatever start script
>> you're using.  I think you need to complain to the Debian packagers
>> about that.
> 
> Hmm, interesting.  I installed from this repo:
> http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
> 
> I was assuming someone in the Postgres project was involved in
> packaging it.  Do you know who I should reach out to in that case?

I'm pretty sure Christoph Berg is at least involved. I cc'd him here in
case he misses this thread.

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


Re: [GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Adam Brusselback
> You might want to increase pg_ctl's wait timeout for this situation,
> since the default's evidently too little.  However ...
Got it, thanks.

> ... pg_ctl itself wouldn't decide to forcibly shut down the server
> if the timeout expired.  It merely stops waiting and tells you so.
> It seems like this must represent misdesign of whatever start script
> you're using.  I think you need to complain to the Debian packagers
> about that.

Hmm, interesting.  I installed from this repo:
http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main

I was assuming someone in the Postgres project was involved in
packaging it.  Do you know who I should reach out to in that case?


-- 
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] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Tom Lane
Adam Brusselback  writes:
> I am in the process of upgrading to Postgres 10, and am having trouble
> getting my streaming replica working.
> OS: Debian 9.2
> Version: 10.1
> I have my primary backed up using pgbackrest, and I restore that to my
> replica.  It generates a recovery.conf which has a restore command for
> the WAL to pull them from the pgbackrest server.
> The recovery succeeds, but when I go to start the cluster on the
> standby, it begins to replay the WAL, and does so for about 30
> seconds.  Then I get a line in my log saying:

>> pg_ctl: server did not start in time

You might want to increase pg_ctl's wait timeout for this situation,
since the default's evidently too little.  However ...

> Followed by:
>> 2017-11-10 20:27:35.907 UTC [7132] LOG:  received smart shutdown request
>> ERROR [063]: : terminated on signal [SIGTERM]

... pg_ctl itself wouldn't decide to forcibly shut down the server
if the timeout expired.  It merely stops waiting and tells you so.
It seems like this must represent misdesign of whatever start script
you're using.  I think you need to complain to the Debian packagers
about that.

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


[GENERAL] Postgres 10.1 fails to start: server did not start in time

2017-11-10 Thread Adam Brusselback
Hey all,
I am in the process of upgrading to Postgres 10, and am having trouble
getting my streaming replica working.

OS: Debian 9.2
Version: 10.1

I have my primary backed up using pgbackrest, and I restore that to my
replica.  It generates a recovery.conf which has a restore command for
the WAL to pull them from the pgbackrest server.

The recovery succeeds, but when I go to start the cluster on the
standby, it begins to replay the WAL, and does so for about 30
seconds.  Then I get a line in my log saying:

> pg_ctl: server did not start in time

Followed by:

> 2017-11-10 20:27:35.907 UTC [7132] LOG:  received smart shutdown request
> ERROR [063]: : terminated on signal [SIGTERM]
> 2017-11-10 20:27:35.911 P00   INFO: archive-get command end: terminated on 
> signal [SIGTERM]
ERROR [063]: : terminated on signal [SIGTERM]
> 2017-11-10 20:27:35.912 P00   INFO: archive-get command end: terminated on 
> signal [SIGTERM]
> 2017-11-10 20:27:35.978 UTC [7142] LOG:  shutting down
> 2017-11-10 20:27:36.151 UTC [7132] LOG:  database system is shut down

This happens weather I have the server configured as a standby or not.

Any help would be very appreciated.

Thanks,
-Adam


-- 
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] archive_command not being executed

2017-11-10 Thread Paul Jungwirth

On 11/10/2017 09:10 AM, Eric D wrote:

I have a standby db server (SB1) that will soon become the master.  SB1
is set up with streaming replication from the current master.  I'm
trying to set up a third server (SB2) as a slave/standby to SB1, so that
when SB1 becomes the master, there will be a standby for it.  First step
is to get WAL files shipped from SB1->SB2.


Oh this has happened to me before. :-) On SB1 you need to set
archive_mode to always (not on). Otherwise it is ignored when running as 
a standby.


Btw just in case you are using Ansible here is an unmerged PR for the 
postgres role: https://github.com/ANXS/postgresql/pull/254


Paul


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


[GENERAL] archive_command not being executed

2017-11-10 Thread Eric D
I have a standby db server (SB1) that will soon become the master.  SB1 is set 
up with streaming replication from the current master.  I'm trying to set up a 
third server (SB2) as a slave/standby to SB1, so that when SB1 becomes the 
master, there will be a standby for it.  First step is to get WAL files shipped 
from SB1->SB2.


Problem is I can't get the archive_command of SB1 to execute.  The same 
archive_command on our current master calls into a script that scp's the WAL 
files to SB1.  This works.  I've also confirmed the script works from SB1->SB2 
when run from the command line, as the postgres user, w/o a password request.


Furthermore, on SB1 I replaced the call to the script with a touch command, to 
see if archive_command was getting called at all:


# This script does the scp of the WAL file to the designated server/directory
#archive_command = '/opt/printra/sbin/handle_wal_files.sh %p db-backup 
/backup/WAL_ARCHIVE/auto'
archive_command = 'touch /var/lib/pgsql/testtouch'


and the testtouch file did not appear.


Here are some relevant settings from SB1:


postgres=# select * from pg_settings where name like 'archive%';

-[ RECORD 1 
]--

name   | archive_command

setting| touch /var/lib/pgsql/testtouch

unit   |

category   | Write-Ahead Log / Archiving

short_desc | Sets the shell command that will be called to archive a WAL file.

extra_desc |

context| sighup

vartype| string

source | configuration file

min_val|

max_val|

enumvals   |

boot_val   |

reset_val  | touch /var/lib/pgsql/testtouch

sourcefile | /var/lib/pgsql/9.3/data/postgresql.conf

sourceline | 607

-[ RECORD 2 
]--

name   | archive_mode

setting| on

unit   |

category   | Write-Ahead Log / Archiving

short_desc | Allows archiving of WAL files using archive_command.

extra_desc |

context| postmaster

vartype| bool

source | configuration file

min_val|

max_val|

enumvals   |

boot_val   | off

reset_val  | on

sourcefile | /var/lib/pgsql/9.3/data/postgresql.conf

sourceline | 604

-[ RECORD 3 
]--

name   | archive_timeout

setting| 0

unit   | s

category   | Write-Ahead Log / Archiving

short_desc | Forces a switch to the next xlog file if a new file has not been 
started within N seconds.

extra_desc |

context| sighup

vartype| integer

source | default

min_val| 0

max_val| 1073741823

enumvals   |

boot_val   | 0

reset_val  | 0

sourcefile |

sourceline |



postgres=# select version();

-[ RECORD 1 
]---

version | PostgreSQL 9.3.19 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 
4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit


I've bumped up logging to debug1 and have not seen anything that looks related 
to the archive_command.  Bumping up to debug2 was really noisy and didn't seem 
to yield any useful info either.  Any ideas?


Re: [GENERAL] Client Authentication methods

2017-11-10 Thread Peter J. Holzer
On 2017-11-10 08:25:24 -0500, chiru r wrote:
> I am trying to understand the Authentication method in pg_hba.conf file
> (password & md5) in PostgreSQL database server. 
> 
> I am assuming that the user provides the  connection string host/usser/
> password,then client will go and contact the DB server pg_hba.conf file in
> memory without carrying password over the network initially, and then it
> confirms the authentication method from pg_hba.conf ,then it decides weather 
> it
> send clear text or md5 encrypted password from client to Server to make a
> session?

I'm not sure what "it" refers to in this sentence. If "it" refers to the
client (as grammatically it should) then the answer is no. The client
doesn't have access to the pg_hba.conf file.

The client connects to the server, sending the username and database
name, but not (yet) the password. Then the server checks the pg_hba.conf
file to determine which authentication method to use. The server then
sends an authentication request to the client, to which the client sends
a response (including, or based on, the password).


> Is my assumption is correct ? or What exactly it make the difference for 
> client
> if i use md5/password  in pg_hba.conf file in DB server?.

See
https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-PASSWORD

With method password, passwords are sent in plain text. With md5, an md5
hash of the password, the username, and a nonce is sent instead.

hp

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature


Re: [GENERAL] Spelling dictionaries

2017-11-10 Thread hmidi slim
What about pg_similarity https://github.com/eulerto/pg_similarity. Do you
have any idea about this?

2017-11-10 10:36 GMT+01:00 Arthur Zakirov :

> On Fri, Nov 10, 2017 at 10:16:06AM +0100, hmidi slim wrote:
> > Hi,
> > I'm using Full Text search and I'm interested on using spelling
> dictionary.
> > I found a website that has a special functionality, for example when I
> > enter the word 'activities' it gives me the suggestions containing this
> > word. But when I enter the word 'activityns' it returns 'No result for
> > 'activityns'' But it gives me some suggestions contained the word
> > 'activities'.
> > In cas I entered the word 'activityng' it returns the same message 'No
> > result for 'activityng' ' But I got some suggestions containing the word
> > 'activity'.
> > Does this the behaviour of the lspell dictionary, because I didn't
> > understand how does he give suggestions when the word is wrong.
>
> You can try pg_trgm extension [1].
>
> Also we have a little demo web-site [2]. It uses pg_trgm. You can look at
> its code [3].
>
>
> 1 - https://www.postgresql.org/docs/current/static/pgtrgm.
> html#idm4642863576
> 2 - http://tsdemo.postgrespro.ru/search?pattern=Galaksy=
> rank_func=ts_rank
> 3 - https://github.com/postgrespro/apod_fts/blob/master/apod.py
>
> --
> Arthur Zakirov
> Postgres Professional: http://www.postgrespro.com
> Russian Postgres Company
>


Re: [GENERAL] Client Authentication methods

2017-11-10 Thread Berend Tober

chiru r wrote:

Hi All,

I am trying to understand the Authentication method in pg_hba.conf file (password 
& md5) in
PostgreSQL database server.

I am assuming that the user provides the  connection string 
host/usser/password,then client will go
and contact the DB server pg_hba.conf file in memory without carrying password 
over the network
initially, and then it confirms the authentication method from pg_hba.conf 
,then it decides weather
it send clear text or md5 encrypted password from client to Server to make a 
session?

Is my assumption is correct ? or What exactly it make the difference for client 
if i use
md5/password  in pg_hba.conf file in DB server?.




Your assumptions sound consistent with documentation appearing at


https://www.postgresql.org/docs/10/static/protocol-flow.html

https://www.postgresql.org/docs/10/static/auth-methods.html

-- B




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


[GENERAL] Client Authentication methods

2017-11-10 Thread chiru r
Hi All,

I am trying to understand the Authentication method in pg_hba.conf file
(password & md5) in PostgreSQL database server.

I am assuming that the user provides the  connection string
host/usser/password,then client will go and contact the DB server
pg_hba.conf file in memory without carrying password over the network
initially, and then it confirms the authentication method from pg_hba.conf
,then it decides weather it send clear text or md5 encrypted password from
client to Server to make a session?

Is my assumption is correct ? or What exactly it make the difference for
client if i use md5/password  in pg_hba.conf file in DB server?.

Thanks,
chiru


Re: [GENERAL] Spelling dictionaries

2017-11-10 Thread Arthur Zakirov
On Fri, Nov 10, 2017 at 10:16:06AM +0100, hmidi slim wrote:
> Hi,
> I'm using Full Text search and I'm interested on using spelling dictionary.
> I found a website that has a special functionality, for example when I
> enter the word 'activities' it gives me the suggestions containing this
> word. But when I enter the word 'activityns' it returns 'No result for
> 'activityns'' But it gives me some suggestions contained the word
> 'activities'.
> In cas I entered the word 'activityng' it returns the same message 'No
> result for 'activityng' ' But I got some suggestions containing the word
> 'activity'.
> Does this the behaviour of the lspell dictionary, because I didn't
> understand how does he give suggestions when the word is wrong.

You can try pg_trgm extension [1].

Also we have a little demo web-site [2]. It uses pg_trgm. You can look at its 
code [3].


1 - https://www.postgresql.org/docs/current/static/pgtrgm.html#idm4642863576
2 - 
http://tsdemo.postgrespro.ru/search?pattern=Galaksy=rank_func=ts_rank
3 - https://github.com/postgrespro/apod_fts/blob/master/apod.py

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


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


[GENERAL] Spelling dictionaries

2017-11-10 Thread hmidi slim
Hi,
I'm using Full Text search and I'm interested on using spelling dictionary.
I found a website that has a special functionality, for example when I
enter the word 'activities' it gives me the suggestions containing this
word. But when I enter the word 'activityns' it returns 'No result for
'activityns'' But it gives me some suggestions contained the word
'activities'.
In cas I entered the word 'activityng' it returns the same message 'No
result for 'activityng' ' But I got some suggestions containing the word
'activity'.
Does this the behaviour of the lspell dictionary, because I didn't
understand how does he give suggestions when the word is wrong.