Re: [GENERAL] BDR, near xid wraparound, a lot of files in pg_subtrans directory

2017-09-14 Thread Craig Ringer
On 15 September 2017 at 11:46, milist ujang wrote: > Hi Craig, > > Thanks again for pointing to inactive replication slot. > After inactive replication slot been dropped, the relfrozenxid now moving. > > I wonder if replication identifier will have some issue if left >

Re: [GENERAL] BDR, near xid wraparound, a lot of files in pg_subtrans directory

2017-09-14 Thread milist ujang
Hi Craig, Thanks again for pointing to inactive replication slot. After inactive replication slot been dropped, the relfrozenxid now moving. I wonder if replication identifier will have some issue if left un-chained? since at other side there are inactive replication identifier. On Fri, Sep

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread George Neuner
On Thu, 14 Sep 2017 17:02:05 -0500, Merlin Moncure wrote: >... With sequences, the database *guarantees* that the >identifier is unique with no exceptions; there never will be a unique >value. Can you give a hypothetical example of how you think they >wouldn't work? Jumping

Re: [GENERAL] BDR, near xid wraparound, a lot of files in pg_subtrans directory

2017-09-14 Thread Craig Ringer
On 14 September 2017 at 13:35, milist ujang wrote: > HI list, > > I have a database with bdr environment which keep alerting these messages > in log file: > > HINT: Close open transactions soon to avoid wraparound problems. > WARNING: oldest xmin is far in the past >

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Joshua D. Drake
On 09/14/2017 03:27 PM, David G. Johnston wrote: On Thu, Sep 14, 2017 at 12:45 AM, Rafal Pietrak >wrote: Hello everybody, Can anybody help me find a way to implement an ID which: 1. guarantees being unique across multiple tables. 2.

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread David G. Johnston
On Thu, Sep 14, 2017 at 12:45 AM, Rafal Pietrak wrote: > Hello everybody, > > Can anybody help me find a way to implement an ID which: > > 1. guarantees being unique across multiple tables. > > 2. guarantees its uniqueness not only during INSERT, but also during the > lifetime

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Merlin Moncure
On Thu, Sep 14, 2017 at 12:11 PM, Rafal Pietrak wrote: > W dniu 14.09.2017 o 15:54, Merlin Moncure pisze: >> On Thu, Sep 14, 2017 at 2:45 AM, Rafal Pietrak wrote: >>> Hello everybody, >>> >>> Can anybody help me find a way to implement an ID which: >>> >>> 1.

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Gavin Flower
On 15/09/17 06:15, Kenneth Marshall wrote: On Thu, Sep 14, 2017 at 07:11:19PM +0200, Rafal Pietrak wrote: As I said, I'm not looking for performance or "fair probability" of planetary-wide uniqueness. My main objective is the "guarantee". Which I've tried to indicate referring to "future

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Karl Czajkowski
On Sep 14, Rafal Pietrak modulated: > My main objective is the "guarantee". Which I've tried to indicate > referring to "future UPDATEs". > With a well-behaved application, it is sufficient to define each ID column as: id int8 UNIQUE NOT NULL DEFAULT nextval('sharedsequence') and ensure

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Rob Sargent
On 09/14/2017 02:39 PM, Rafal Pietrak wrote: W dniu 14.09.2017 o 19:30, Rob Sargent pisze: On 09/14/2017 11:11 AM, Rafal Pietrak wrote: [--] So I'm stuck with seriously incomplete solution. that's why I have an impression, that I'm going into entirely wrong direction

[GENERAL] Table partition - parent table use

2017-09-14 Thread Luiz Hugo Ronqui
Hello everybody! I have searched quite a bit, but haven't found a setup like the ours, so I decided to ask if I'm missing something: We have a database with data being inserted for almost 10 years and no policy defined to get rid of old records, even though we mostly use only the current and

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Rafal Pietrak
W dniu 14.09.2017 o 19:30, Rob Sargent pisze: > > > On 09/14/2017 11:11 AM, Rafal Pietrak wrote: >> [--] >> So I'm stuck with seriously incomplete solution. >> >> that's why I have an impression, that I'm going into entirely wrong >> direction here. >> >> > So you care if the

[GENERAL] COMMIT TRIGGER implementation using CONSTRAINT TRIGGERs

2017-09-14 Thread Nico Williams
I've written an approximation of "commit triggers" for PostgreSQL using CONSTRAINT TRIGGERs (as users have often been told to do who want this feature). Semantics (and a warning) are included in commentary in the source: https://github.com/twosigma/postgresql-contrib/

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Kenneth Marshall
On Thu, Sep 14, 2017 at 07:11:19PM +0200, Rafal Pietrak wrote: > > As I said, I'm not looking for performance or "fair probability" of > planetary-wide uniqueness. > > My main objective is the "guarantee". Which I've tried to indicate > referring to "future UPDATEs". > > What I mean here is

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Rob Sargent
On 09/14/2017 11:11 AM, Rafal Pietrak wrote: Not really. As I said, I'm not looking for performance or "fair probability" of planetary-wide uniqueness. My main objective is the "guarantee". Which I've tried to indicate referring to "future UPDATEs". What I mean here is functionality

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Rafal Pietrak
W dniu 14.09.2017 o 15:54, Merlin Moncure pisze: > On Thu, Sep 14, 2017 at 2:45 AM, Rafal Pietrak wrote: >> Hello everybody, >> >> Can anybody help me find a way to implement an ID which: >> >> 1. guarantees being unique across multiple tables. >> >> 2. guarantees its

Re: [GENERAL] How to add new Collation language

2017-09-14 Thread Rob Northcott
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: 14 September 2017 14:53 To: Rob Northcott Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] How to add new Collation language Rob Northcott writes: >

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Steve Atkins
> On Sep 14, 2017, at 8:38 AM, Karl Czajkowski wrote: > > On Sep 14, vinny modulated: > >> If it is only one database, on one server, then couldn't you just >> use one sequence? >> If oyu prefix the value with some identifier of the current table >> then you cannot get

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Karl Czajkowski
On Sep 14, vinny modulated: > If it is only one database, on one server, then couldn't you just > use one sequence? > If oyu prefix the value with some identifier of the current table > then you cannot get duplicates > across tables even if you reset the sequence. > I didn't follow the whole

Re: [GENERAL] Configuration of pgaudit settings in postgreSQL.conf causes postgreSQL to fail to start

2017-09-14 Thread Troy Hardin
Jeff/Arthur, Thanks. I am testing on version 9.5.7 with pgaudit 1.0.6. The production system is currently 9.5.7 but will receive updates to 9.5.9 and beyond as updates are made available. I will paste in here info from the postgreSQL logs and then a couple entries from Event Viewer.

Re: [GENERAL] Configuration of pgaudit settings in postgreSQL.conf causes postgreSQL to fail to start

2017-09-14 Thread Jeff Janes
On Sep 14, 2017 7:07 AM, "Arthur Zakirov" wrote: On Wed, Sep 13, 2017 at 02:42:18PM +, Troy Hardin wrote: > Putting either of these two lines in the .conf file cause it to fail to start. Can you show error messages from logs? And the version.

Re: [GENERAL] Configuration of pgaudit settings in postgreSQL.conf causes postgreSQL to fail to start

2017-09-14 Thread Arthur Zakirov
On Wed, Sep 13, 2017 at 02:42:18PM +, Troy Hardin wrote: > Putting either of these two lines in the .conf file cause it to fail to start. Can you show error messages from logs? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Merlin Moncure
On Thu, Sep 14, 2017 at 2:45 AM, Rafal Pietrak wrote: > Hello everybody, > > Can anybody help me find a way to implement an ID which: > > 1. guarantees being unique across multiple tables. > > 2. guarantees its uniqueness not only during INSERT, but also during the > lifetime of

Re: [GENERAL] How to add new Collation language

2017-09-14 Thread Tom Lane
Rob Northcott writes: > From: rob stone [mailto:floripa...@gmail.com] >> On Thu, 2017-09-14 at 11:30 +, Rob Northcott wrote: >>> How can I add a collation language to a Postgres server? >>> Specifically, I want to create a new database with collation of >>>

Re: [GENERAL] How to add new Collation language

2017-09-14 Thread Rob Northcott
-Original Message- From: rob stone [mailto:floripa...@gmail.com] Sent: 14 September 2017 13:38 To: Rob Northcott ; pgsql-general@postgresql.org Subject: Re: [GENERAL] How to add new Collation language On Thu, 2017-09-14 at 11:30 +, Rob

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread vinny
On 2017-09-14 15:06, Rafal Pietrak wrote: W dniu 14.09.2017 o 10:57, George Neuner pisze: On Thu, 14 Sep 2017 09:45:59 +0200, Rafal Pietrak wrote: Hello everybody, Can anybody help me find a way to implement an ID which: 1. guarantees being unique across multiple tables.

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-14 Thread Pavel Stehule
2017-09-14 15:09 GMT+02:00 Pavel Stehule : > > > 2017-09-14 14:59 GMT+02:00 Frank Millman : > >> Pavel Stehule wrote: >> >> 2017-09-14 10:14 GMT+02:00 Frank Millman : >> >>> Hi all >>> >>> This is a follow-up to a recent question I

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-14 Thread Pavel Stehule
2017-09-14 14:59 GMT+02:00 Frank Millman : > Pavel Stehule wrote: > > 2017-09-14 10:14 GMT+02:00 Frank Millman : > >> Hi all >> >> This is a follow-up to a recent question I posted regarding a slow query. >> I thought that the slowness was caused by the

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Rafal Pietrak
W dniu 14.09.2017 o 10:57, George Neuner pisze: > On Thu, 14 Sep 2017 09:45:59 +0200, Rafal Pietrak > wrote: > >> Hello everybody, >> >> Can anybody help me find a way to implement an ID which: >> >> 1. guarantees being unique across multiple tables. >> >> 2. guarantees its

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-14 Thread Frank Millman
Pavel Stehule wrote: 2017-09-14 10:14 GMT+02:00 Frank Millman : Hi all This is a follow-up to a recent question I posted regarding a slow query. I thought that the slowness was caused by the number of JOINs in the query, but with your assistance I have found the true

Re: [GENERAL] How to add new Collation language

2017-09-14 Thread rob stone
On Thu, 2017-09-14 at 11:30 +, Rob Northcott wrote: > How can I add a collation language to a Postgres server? > Specifically, I want to create a new database with collation of > English_United Kingdom.1252 but the only options are C, Posix and > United States. > Even if I select United

[GENERAL] Configuration of pgaudit settings in postgreSQL.conf causes postgreSQL to fail to start

2017-09-14 Thread Troy Hardin
I support an existing product that utilizes postgreSQL in a Windows environment. Recently we've been asked to make a series of security/auditing changes to the product that require pgaudit. We built pgaudit.dll and have made the majority of the configuration changes and those seem to be

[GENERAL] Major Version Upgradation from 9.4 to 9.6

2017-09-14 Thread Amee Sankhesara - Quipment India
[Quipment Logo] Hello, We have a windows setup for PostgreSQL(Version 9.4). Now we are upgrading Major version 9.4 to 9.6. Total Database size - 421 GB RAM - 16 GB Core - 8 Size of Data Directory Drive - 500 GB We have 3 database in 421 GB. 1)X database size - 12 GB 2)Y database

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-09-14 Thread Pavel Stehule
2017-09-14 10:14 GMT+02:00 Frank Millman : > Hi all > > This is a follow-up to a recent question I posted regarding a slow query. > I thought that the slowness was caused by the number of JOINs in the query, > but with your assistance I have found the true reason. I said in

[GENERAL] How to add new Collation language

2017-09-14 Thread Rob Northcott
How can I add a collation language to a Postgres server? Specifically, I want to create a new database with collation of English_United Kingdom.1252 but the only options are C, Posix and United States. Even if I select United Kingdom as the locale when installing Postgres I still only have

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread George Neuner
On Thu, 14 Sep 2017 09:45:59 +0200, Rafal Pietrak wrote: >Hello everybody, > >Can anybody help me find a way to implement an ID which: > >1. guarantees being unique across multiple tables. > >2. guarantees its uniqueness not only during INSERT, but also during the >lifetime of

[GENERAL] a JOIN to a VIEW seems slow

2017-09-14 Thread Frank Millman
Hi all This is a follow-up to a recent question I posted regarding a slow query. I thought that the slowness was caused by the number of JOINs in the query, but with your assistance I have found the true reason. I said in the previous thread that the question had become academic, but now that

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread Michael Paquier
On Thu, Sep 14, 2017 at 4:45 PM, Rafal Pietrak wrote: > Can anybody help me find a way to implement an ID which: > > 1. guarantees being unique across multiple tables. > > 2. guarantees its uniqueness not only during INSERT, but also during the > lifetime of the

Re: [GENERAL] looking for a globally unique row ID

2017-09-14 Thread John R Pierce
On 9/14/2017 12:45 AM, Rafal Pietrak wrote: Can anybody help me find a way to implement an ID which: 1. guarantees being unique across multiple tables. 2. guarantees its uniqueness not only during INSERT, but also during the lifetime of the database/application (e.i. during future UPDATES).

[GENERAL] looking for a globally unique row ID

2017-09-14 Thread Rafal Pietrak
Hello everybody, Can anybody help me find a way to implement an ID which: 1. guarantees being unique across multiple tables. 2. guarantees its uniqueness not only during INSERT, but also during the lifetime of the database/application (e.i. during future UPDATES). 3. guarantees persistence of

Re: [GENERAL] equivalent for md5, clobs and varchar2 list

2017-09-14 Thread George Neuner
On Thu, 14 Sep 2017 00:01:09 +, Peter Koukoulis wrote: >is there an equivalent of a odcivarchar2list in PostgreSQL. I'm running the >code in Oracle 11gr2. >I know that the equivalent of dbms_crypto. hash( " " ,2) is md5(), but I >cannot find anything similar to