Re: Is pg_restore in 10.6 working?

2018-11-12 Thread David
Thanks, Adrian.  It's running now.

On Mon, Nov 12, 2018 at 5:05 PM Adrian Klaver 
wrote:

> On 11/12/18 1:58 PM, David wrote:
>
> Please reply to list also.
> Ccing list
>
> > Yes, that's what I get for writing emails while I'm doing 5 other things
> > at the same time.  So, let me try this again.
> > pg_dump is working when I use the following:
> > pg_dump -U postgres -F d -f /pgbackup/prod/data -v --section=data
> prod_data
> > To be clear, prod_data is the name of the database.
> > This works fine, I get /pgbackup/prod/data created and populated by
> > compressed files, as advertised.
> >
> > How to I restore this?  Is there a specific combination of command line
> > options for this format?
> > I've tried -d prod_data and -f /pgbackup/prod/data -F d, but I get an
> error:
> > options -d and -f cannot be used together.
> >
> > So I take -d off the command line and I get
> > [directory archiver] no output directory specified.
> > and if I use this I get nothing at all
> > pg_restore -U postgres -f /pgbackup/prod/data -v
> >
> > So I'm confused.
>
> Enlightenment:
>
> https://www.postgresql.org/docs/10/app-pgrestore.html
>
> -f filename
> --file=filename
>
>  Specify output file for generated script, or for the listing when
> used with -l. Default is the standard output.
>
> -d dbname
> --dbname=dbname
>
>  Connect to database dbname and restore directly into the database.
>
>
> filename
>
>  Specifies the location of the archive file (or directory, for a
> directory-format archive) to be restored. If not specified, the standard
> input is used.
>
>
> So something like:
>
> pg_restore -U postgres -v -d prod_data /pgbackup/prod/data
>
> >
> > thanks again.
> >
> >
> >
> > On Mon, Nov 12, 2018 at 4:39 PM Adrian Klaver  > > wrote:
> >
> > On 11/12/18 11:39 AM, David wrote:
> >  > I'm not following your question.  The pre-data and post-data
> > sections
> >  > each go to an individual file, but the data section goes to a
> >  > directory.  I can restore the files using psql, but it is the
> > restore of
> >  > the directory that is hanging.
> >
> > That is not what you showed in your OP:
> >
> > This pg_dump command works:
> > pg_dump -U postgres -f predata.sql -F p -v  -d prod_data
> >
> > But a matching pg_restore command does nothing.
> > pg_restore -U postgres -f predata.sql -v
> >
> > We would need to see the commands for data section to be able to
> > comment
> > further.
> >
> >  >
> >  > On Mon, Nov 12, 2018 at 2:28 PM Rob Sargent
> > mailto:robjsarg...@gmail.com>
> >  > >>
> wrote:
> >  >
> >  >
> >  > On 11/12/18 11:44 AM, Tom Lane wrote:
> >  >  > David mailto:dlbarro...@gmail.com>
> > >> writes:
> >  >  >> I have some experience with different versions of
> > Postgres, but
> >  > I'm just
> >  >  >> getting around to using pg_restore, and it's not working
> > for me
> >  > at all.
> >  >  >> ...
> >  >  >> But a matching pg_restore command does nothing.
> >  >  >> pg_restore -U postgres -f predata.sql -v
> >  >  > This command expects to read from stdin and write to
> > predata.sql, so
> >  >  > it's not surprising that it's just sitting there.  What
> > you want
> >  >  > is something along the lines of
> >  >  >
> >  >  > pg_restore -U postgres -d dbname -v  >  >  >
> >  >  >   regards, tom lane
> >  >  >
> >  >
> >  > In this case, does the "General options" -f make sense?
> > restoring to
> >  > a file?
> >  >
> >  >
> >
> >
> > --
> > Adrian Klaverfile:///usr/share/applications/thunderbird.desktop
> > adrian.kla...@aklaver.com 
> >
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>


Re: Is pg_restore in 10.6 working?

2018-11-12 Thread Adrian Klaver

On 11/12/18 2:07 PM, raf wrote:

Tom Lane wrote:


David  writes:

I have some experience with different versions of Postgres, but I'm just
getting around to using pg_restore, and it's not working for me at all.
...
But a matching pg_restore command does nothing.
pg_restore -U postgres -f predata.sql -v


This command expects to read from stdin and write to predata.sql, so
it's not surprising that it's just sitting there.  What you want
is something along the lines of

pg_restore -U postgres -d dbname -v 

Does that mean there's a bug in the usage message?

pg_restore --help says (admittedly on 9.5 but it's probably the same with 10.6):

   Usage:
 pg_restore [OPTION]... [FILE]

 ...

 If no input file name is supplied, then standard input is used.

To me, that says that a filename on the command line after the options
will be read as the source of the restore. Only if it is absent would
stdin be used.


The example Tom showed was for using a plain text file as the source 
instead of the default which is one of the custom formats.




Apologies if the usage message for 10.6 doesn't say the same thing.

cheers,
raf





--
Adrian Klaver
adrian.kla...@aklaver.com



Re: Is pg_restore in 10.6 working?

2018-11-12 Thread raf
Tom Lane wrote:

> David  writes:
> > I have some experience with different versions of Postgres, but I'm just
> > getting around to using pg_restore, and it's not working for me at all.
> > ...
> > But a matching pg_restore command does nothing.
> > pg_restore -U postgres -f predata.sql -v
> 
> This command expects to read from stdin and write to predata.sql, so
> it's not surprising that it's just sitting there.  What you want
> is something along the lines of
> 
> pg_restore -U postgres -d dbname -v  
>   regards, tom lane

Does that mean there's a bug in the usage message?

pg_restore --help says (admittedly on 9.5 but it's probably the same with 10.6):

  Usage:
pg_restore [OPTION]... [FILE]

...

If no input file name is supplied, then standard input is used.

To me, that says that a filename on the command line after the options
will be read as the source of the restore. Only if it is absent would
stdin be used.

Apologies if the usage message for 10.6 doesn't say the same thing.

cheers,
raf




Re: Is pg_restore in 10.6 working?

2018-11-12 Thread raf
raf wrote:

> Tom Lane wrote:
> 
> > David  writes:
> > > I have some experience with different versions of Postgres, but I'm just
> > > getting around to using pg_restore, and it's not working for me at all.
> > > ...
> > > But a matching pg_restore command does nothing.
> > > pg_restore -U postgres -f predata.sql -v
> > 
> > This command expects to read from stdin and write to predata.sql, so
> > it's not surprising that it's just sitting there.  What you want
> > is something along the lines of
> > 
> > pg_restore -U postgres -d dbname -v  > 
> > regards, tom lane
> 
> Does that mean there's a bug in the usage message?
> 
> pg_restore --help says (admittedly on 9.5 but it's probably the same with 
> 10.6):
> 
>   Usage:
> pg_restore [OPTION]... [FILE]
> 
> ...
> 
> If no input file name is supplied, then standard input is used.
> 
> To me, that says that a filename on the command line after the options
> will be read as the source of the restore. Only if it is absent would
> stdin be used.
> 
> Apologies if the usage message for 10.6 doesn't say the same thing.

Ah, I didn't notice the -f (output) option. Never mind.

cheers,
raf




Re: Is pg_restore in 10.6 working?

2018-11-12 Thread Adrian Klaver

On 11/12/18 1:58 PM, David wrote:

Please reply to list also.
Ccing list

Yes, that's what I get for writing emails while I'm doing 5 other things 
at the same time.  So, let me try this again.

pg_dump is working when I use the following:
pg_dump -U postgres -F d -f /pgbackup/prod/data -v --section=data prod_data
To be clear, prod_data is the name of the database.
This works fine, I get /pgbackup/prod/data created and populated by 
compressed files, as advertised.


How to I restore this?  Is there a specific combination of command line 
options for this format?

I've tried -d prod_data and -f /pgbackup/prod/data -F d, but I get an error:
options -d and -f cannot be used together.

So I take -d off the command line and I get
[directory archiver] no output directory specified.
and if I use this I get nothing at all
pg_restore -U postgres -f /pgbackup/prod/data -v

So I'm confused.


Enlightenment:

https://www.postgresql.org/docs/10/app-pgrestore.html

-f filename
--file=filename

Specify output file for generated script, or for the listing when 
used with -l. Default is the standard output.


-d dbname
--dbname=dbname

Connect to database dbname and restore directly into the database.


filename

Specifies the location of the archive file (or directory, for a 
directory-format archive) to be restored. If not specified, the standard 
input is used.



So something like:

pg_restore -U postgres -v -d prod_data /pgbackup/prod/data



thanks again.



On Mon, Nov 12, 2018 at 4:39 PM Adrian Klaver > wrote:


On 11/12/18 11:39 AM, David wrote:
 > I'm not following your question.  The pre-data and post-data
sections
 > each go to an individual file, but the data section goes to a
 > directory.  I can restore the files using psql, but it is the
restore of
 > the directory that is hanging.

That is not what you showed in your OP:

This pg_dump command works:
pg_dump -U postgres -f predata.sql -F p -v  -d prod_data

But a matching pg_restore command does nothing.
pg_restore -U postgres -f predata.sql -v

We would need to see the commands for data section to be able to
comment
further.

 >
 > On Mon, Nov 12, 2018 at 2:28 PM Rob Sargent
mailto:robjsarg...@gmail.com>
 > >> wrote:
 >
 >
 >     On 11/12/18 11:44 AM, Tom Lane wrote:
 >      > David mailto:dlbarro...@gmail.com>
>> writes:
 >      >> I have some experience with different versions of
Postgres, but
 >     I'm just
 >      >> getting around to using pg_restore, and it's not working
for me
 >     at all.
 >      >> ...
 >      >> But a matching pg_restore command does nothing.
 >      >> pg_restore -U postgres -f predata.sql -v
 >      > This command expects to read from stdin and write to
predata.sql, so
 >      > it's not surprising that it's just sitting there.  What
you want
 >      > is something along the lines of
 >      >
 >      > pg_restore -U postgres -d dbname -v       >
 >      >                       regards, tom lane
 >      >
 >
 >     In this case, does the "General options" -f make sense?
restoring to
 >     a file?
 >
 >


-- 
Adrian Klaverfile:///usr/share/applications/thunderbird.desktop

adrian.kla...@aklaver.com 




--
Adrian Klaver
adrian.kla...@aklaver.com



Re: Is pg_restore in 10.6 working?

2018-11-12 Thread Adrian Klaver

On 11/12/18 11:39 AM, David wrote:
I'm not following your question.  The pre-data and post-data sections 
each go to an individual file, but the data section goes to a 
directory.  I can restore the files using psql, but it is the restore of 
the directory that is hanging.


That is not what you showed in your OP:

This pg_dump command works:
pg_dump -U postgres -f predata.sql -F p -v  -d prod_data

But a matching pg_restore command does nothing.
pg_restore -U postgres -f predata.sql -v

We would need to see the commands for data section to be able to comment 
further.




On Mon, Nov 12, 2018 at 2:28 PM Rob Sargent > wrote:



On 11/12/18 11:44 AM, Tom Lane wrote:
 > David mailto:dlbarro...@gmail.com>> writes:
 >> I have some experience with different versions of Postgres, but
I'm just
 >> getting around to using pg_restore, and it's not working for me
at all.
 >> ...
 >> But a matching pg_restore command does nothing.
 >> pg_restore -U postgres -f predata.sql -v
 > This command expects to read from stdin and write to predata.sql, so
 > it's not surprising that it's just sitting there.  What you want
 > is something along the lines of
 >
 > pg_restore -U postgres -d dbname -v 
 >                       regards, tom lane
 >

In this case, does the "General options" -f make sense? restoring to
a file?





--
Adrian Klaverfile:///usr/share/applications/thunderbird.desktop
adrian.kla...@aklaver.com



Re: Is pg_restore in 10.6 working?

2018-11-12 Thread Rob Sargent

On 11/12/18 2:06 PM, Tom Lane wrote:

Rob Sargent  writes:

On 11/12/18 12:39 PM, David wrote:

I'm not following your question.  The pre-data and post-data sections
each go to an individual file, but the data section goes to a
directory.  I can restore the files using psql, but it is the restore
of the directory that is hanging.

The other bit that I think David is missing is that pg_dump's default
output format is a plain-text SQL script, which is meant to be fed to
psql not pg_restore.  To get something that pg_restore can work with,
you need to specify one of the non-text dump formats (typically, you'd
use -Fc or -Fd).

The situation in which you'd want to use "pg_restore -f" is if you
want to reconstruct a plain-text SQL script from one of the non-text
dump formats, rather than just restoring directly into a database.

regards, tom lane


Roger that. Thank you.




Re: Is pg_restore in 10.6 working?

2018-11-12 Thread Tom Lane
Rob Sargent  writes:
> On 11/12/18 12:39 PM, David wrote:
>> I'm not following your question.  The pre-data and post-data sections 
>> each go to an individual file, but the data section goes to a 
>> directory.  I can restore the files using psql, but it is the restore 
>> of the directory that is hanging.

The other bit that I think David is missing is that pg_dump's default
output format is a plain-text SQL script, which is meant to be fed to
psql not pg_restore.  To get something that pg_restore can work with,
you need to specify one of the non-text dump formats (typically, you'd
use -Fc or -Fd).

The situation in which you'd want to use "pg_restore -f" is if you
want to reconstruct a plain-text SQL script from one of the non-text
dump formats, rather than just restoring directly into a database.

regards, tom lane



Re: Is pg_restore in 10.6 working?

2018-11-12 Thread Joshua D. Drake

On 11/12/18 10:37 AM, David wrote:


I can connect with psql either of these two ways:
psql -U postgres
or
psql -h ip-172-31-62-127.ec2.internal -p 5432 -U postgres -W postgres
(Yes, it's an AWS server)

This pg_dump command works:
pg_dump -U postgres -f predata.sql -F p -v  -d prod_data

But a matching pg_restore command does nothing.
pg_restore -U postgres -f predata.sql -v



pg_restore -U postgres -v predata.sql


-f is used to output data from a backup file into predata.sql.


Usage:
  pg_restore [OPTION]... [FILE]

General options:
  -d, --dbname=NAME    connect to database name
  -f, --file=FILENAME  output file name
  -F, --format=c|d|t   backup file format (should be automatic)
  -l, --list   print summarized TOC of the archive
  -v, --verbose    verbose mode
  -V, --version    output version information, then exit
  -?, --help   show this help, then exit




I'm running 10.6.

thank you




--
Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc
***  A fault and talent of mine is to tell it exactly how it is.  ***
PostgreSQL centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://postgresconf.org
* Unless otherwise stated, opinions are my own.   *




Re: libwinpthread-1.dll missing in PostgreSQL 11.0-1 for Windows

2018-11-12 Thread Marko Krajnc
I need the version without installer. But the

But the version 11.1 located at:
   https://www.enterprisedb.com/products-services-training/pgbindownload

(and suggested by the Thomas Kellerer in a parallel answer) works without
problems...

Thank you,
Marko Krajnc

On Mon, Nov 12, 2018 at 3:47 PM Adrian Klaver 
wrote:

> On 11/12/18 2:19 AM, Marko Krajnc wrote:
> > Hi!
> >
> > I just downloaded the letest version of PostgreSQL for Windows - v11.0-1
> > (as a ZIP archive here:
> > https://www.enterprisedb.com/download-postgresql-binaries) and started
>
>  From the above:
>
> "The links below allow you to download archives of the files installed
> by our PostgreSQL installers. These archives are provided as a
> convenience for expert users; unless you specifically need these files,
> you should download an installer instead."
>
> Have you tried the installer?:
> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
>
> > the initdb.exe to initialize the database, but I get the message that
> > libwinpthread-1.dll is missing. PgAdmin 4 works out of the box with this
> > version.
> >
> > If I do the same with version 10.5, the initdb.exe works - but I can not
> > use PgAdmin 4 (I get the "Fata Error" message: "The application server
> > could not be contacted").
> >
> > Regards,
> > Marko
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>


Re: help with aggregation query across a second text array column

2018-11-12 Thread Rob Nikander



> On Nov 12, 2018, at 9:40 AM, Scot Kreienkamp  
> wrote:
> …

I’m not too confident in my answer here (there could be a better way), but this 
might help. You could use the `unnest` function to transform the array into 
multiple rows. For example, given a table like 

create table t1 (env text, cls text, cls2 text[]);

I can query it like:

select env, string_agg(cls, ‘,’)
  from (select env, cls from t1
   union
   select env, unnest(cls2) from t1) t
group by env;

Rob


Re: libwinpthread-1.dll missing in PostgreSQL 11.0-1 for Windows

2018-11-12 Thread Thomas Kellerer
Marko Krajnc schrieb am 12.11.2018 um 11:19:
> I just downloaded the letest version of PostgreSQL for Windows -
> v11.0-1 (as a ZIP archive here:
> https://www.enterprisedb.com/download-postgresql-binaries) and
> started the initdb.exe to initialize the database, but I get the
> message that libwinpthread-1.dll is missing. PgAdmin 4 works out of
> the box with this version.
> 
> If I do the same with version 10.5, the initdb.exe works - but I can
> not use PgAdmin 4 (I get the "Fata Error" message: "The application
> server could not be contacted").

When did you download the archive? 

This has been discussed before on the hackers Mailing list: 

https://www.postgresql.org/message-id/flat/a7935d91-d1c7-e7b8-cfa6-0e736ff5610a%40chrullrich.net

When I downloaded the archive (named 
postgresql-11.0-2-windows-x64-binaries.zip) shortly after that discussion, the 
problem was fixed. 

The current archive for 11.1 definitely contains the DLL

However, I use the archives available from: 
https://www.enterprisedb.com/products-services-training/pgbindownload

It seems those from https://www.enterprisedb.com/download-postgresql-binaries 
are somewhat outdated as that page still shows 11.0 and not 11.1

Thomas



Re: Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Adrian Klaver

On 11/12/18 6:45 AM, Karl Martin Skoldebrand wrote:

Thanks,


https://www.postgresql.org/docs/10/release.html


That's a massive list. But going for the first major release makes it 
manageable.


Project policy is to only make feature changes on major version 
releases, so hitting only these will pretty much cover it.





---



To be more certain I would set up a dev database with the new version and test 
against >that.


Aye, we've got a production and a test server. We're going to do the test 
server first and run tests on it for a bit so weed out any incompatibilities.
Just by a quick check, I don't see any anything seriously strange (yet). But 
we'll see ...

/M


Disclaimer:  This message and the information contained herein is proprietary and 
confidential and subject to the Tech Mahindra policy statement, you may review the policy 
at http://www.techmahindra.com/Disclaimer.html 
 externally 
http://tim.techmahindra.com/tim/disclaimer.html 
 internally within TechMahindra.







--
Adrian Klaver
adrian.kla...@aklaver.com



Re: libwinpthread-1.dll missing in PostgreSQL 11.0-1 for Windows

2018-11-12 Thread Adrian Klaver

On 11/12/18 2:19 AM, Marko Krajnc wrote:

Hi!

I just downloaded the letest version of PostgreSQL for Windows - v11.0-1 
(as a ZIP archive here: 
https://www.enterprisedb.com/download-postgresql-binaries) and started 


From the above:

"The links below allow you to download archives of the files installed 
by our PostgreSQL installers. These archives are provided as a 
convenience for expert users; unless you specifically need these files, 
you should download an installer instead."


Have you tried the installer?:
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

the initdb.exe to initialize the database, but I get the message that 
libwinpthread-1.dll is missing. PgAdmin 4 works out of the box with this 
version.


If I do the same with version 10.5, the initdb.exe works - but I can not 
use PgAdmin 4 (I get the "Fata Error" message: "The application server 
could not be contacted").


Regards,
Marko



--
Adrian Klaver
adrian.kla...@aklaver.com



RE: Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Karl Martin Skoldebrand
Thanks,

>https://www.postgresql.org/docs/10/release.html

That's a massive list. But going for the first major release makes it 
manageable.

> ---

>To be more certain I would set up a dev database with the new version and test 
>against >that.

Aye, we've got a production and a test server. We're going to do the test 
server first and run tests on it for a bit so weed out any incompatibilities.
Just by a quick check, I don't see any anything seriously strange (yet). But 
we'll see ...

/M


Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html 
 externally 
http://tim.techmahindra.com/tim/disclaimer.html 
 internally within 
TechMahindra.






help with aggregation query across a second text array column

2018-11-12 Thread Scot Kreienkamp

Hi everyone,


I had a dataset like so:

Servername|Primary class
--
Server1| retail
Server2| dmz
Server3 | NA


And I used this query to summarize it for automated tools:
select environment|| ':' || string_agg(name,',') from servers group by 
environment order by environment;


Now my dataset has changed to:
Servername text|Primary class text|Secondary class text[1d array]

Server1| retail |['dmz']



There can be multiple classes for secondary but they will be the same classes 
as the primary classes.  Input is controlled via web pages so that should be 
guaranteed.  For instance, servers that have primary class of SQL but also 
belong to an application class.  Now I need to change my summary query to 
include all the servers for each class taking into account the secondary class 
column and I'm completely baffled on how to do so with the array.  I know the 
any trick and use it to match against the array when querying for specific 
primary and secondary classes but I can't figure out how to generate the 
listing the same as the old summary query I was using.


Scot Kreienkamp | Senior Systems Engineer | La-Z-Boy Corporate
One La-Z-Boy Drive | Monroe, Michigan 48162  | * 734-384-6403 | | * 7349151444 
| *  scot.kreienk...@la-z-boy.com
www.la-z-boy.com | 
facebook.com/lazboy
 | twitter.com/lazboy | 
youtube.com/lazboy

[cid:lzbVertical_hres.jpg]



This message is intended only for the individual or entity to which it is 
addressed.  It may contain privileged, confidential information which is exempt 
from disclosure under applicable laws.  If you are not the intended recipient, 
you are strictly prohibited from disseminating or distributing this information 
(other than to the intended recipient) or copying this information.  If you 
have received this communication in error, please notify us immediately by 
e-mail or by telephone at the above number. Thank you.


libwinpthread-1.dll missing in PostgreSQL 11.0-1 for Windows

2018-11-12 Thread Marko Krajnc
Hi!

I just downloaded the letest version of PostgreSQL for Windows - v11.0-1
(as a ZIP archive here:
https://www.enterprisedb.com/download-postgresql-binaries) and started the
initdb.exe to initialize the database, but I get the message that
libwinpthread-1.dll is missing. PgAdmin 4 works out of the box with this
version.

If I do the same with version 10.5, the initdb.exe works - but I can not
use PgAdmin 4 (I get the "Fata Error" message: "The application server
could not be contacted").

Regards,
Marko


Re: Move cluster to new host, upgraded version

2018-11-12 Thread Ron

On 11/12/2018 07:55 AM, Rich Shepard wrote:

On Sun, 11 Nov 2018, Ron wrote:


Unless your db is small, do a parallel dump. Even then, do a "-Fc" backup
instead. That's been the recommended method for many years.


Ron,

  I've several databases, none 'large.' When I've used pg_dumpall in the
past it's always with the clean option (-c) and the output directed to a
specified filename with the -f option. I don't find an -F option on the man
page.


Hmm.  Apparently -F is only an option to pg_dump.  (I use multiple pg_dump 
statements + "pg_dumpall --globals-only".)


--
Angular momentum makes the world go 'round.



Re: Move cluster to new host, upgraded version

2018-11-12 Thread Rich Shepard

On Sun, 11 Nov 2018, Ron wrote:


Unless your db is small, do a parallel dump. Even then, do a "-Fc" backup
instead. That's been the recommended method for many years.


Ron,

  I've several databases, none 'large.' When I've used pg_dumpall in the
past it's always with the clean option (-c) and the output directed to a
specified filename with the -f option. I don't find an -F option on the man
page.

  Anywho, specifying the 10.5 version's hostname (-h) to pg_dumpall on the
11.1 version resulted a few seconds later with an output file.

Regards,

Rich



RE: Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Karl Martin Skoldebrand
Thanks for your input.

/M.


Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html 
 externally 
http://tim.techmahindra.com/tim/disclaimer.html 
 internally within 
TechMahindra.




Re: Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Pavel Stehule
po 12. 11. 2018 v 11:45 odesílatel Karl Martin Skoldebrand <
ks0c77...@techmahindra.com> napsal:

> I found a note on logical replication in PostgreSQL 10.x with the caveat
> “There are also a number of caveats regarding what objects are actually
> replicated—for example, only tables are replicated, such objects as views
> and sequences are not.”
>
>
>
> Does replication in 10.x now include views etc? We have quite a number of
> those that would it be if they are included.
>

PostgreSQL doesn't add new features in minor versions - so all limits for
10 are valid for 10.x

The replication doesn't copy views - but the views (not materialized views)
are stored queries. So if you replicate data, then views are refreshed
automatically. The significant limit of logical replication of PostgreSQL
10, 11 is impossibility to replicated DDL commands - the change of schema
should be distributed by different method.

Regards

Pavel

>
>
> /M
>
>
> 
>
> Disclaimer:  This message and the information contained herein is
> proprietary and confidential and subject to the Tech Mahindra policy
> statement, you may review the policy at
> http://www.techmahindra.com/Disclaimer.html externally
> http://tim.techmahindra.com/tim/disclaimer.html internally within
> TechMahindra.
>
>
> 
>


RE: Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Karl Martin Skoldebrand
I found a note on logical replication in PostgreSQL 10.x with the caveat "There 
are also a number of caveats regarding what objects are actually replicated-for 
example, only tables are replicated, such objects as views and sequences are 
not."

Does replication in 10.x now include views etc? We have quite a number of those 
that would it be if they are included.

/M


Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html 
 externally 
http://tim.techmahindra.com/tim/disclaimer.html 
 internally within 
TechMahindra.




Re: Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Pavel Stehule
Hi

po 12. 11. 2018 v 10:18 odesílatel Karl Martin Skoldebrand <
ks0c77...@techmahindra.com> napsal:

> Are there any recommendations regarding upgrading from PG 9.3 to 9.6 or
> 10.x?
>
> I found a few changes at
> https://severalnines.com/blog/upgrading-your-database-to-postgresql-version-10
> but are there more things to keep in mind regarding changes in
> scripts/queries that might affect an already existing application? Should
> we stop at 9.6 or go 10.x considering that 10.x seems almost about a year
> old, and 11.x is out there.
>
> I have limited experience with PG so far, but quite long experience with
> MySQL and OSS in general.
>

There are not reasons, why don't use PostgreSQL 10.

Regards

Pavel


>
>
> Best regards,
>
>
>
> Martin Skjoldebrand
>
>
>
>
> 
>
> Disclaimer:  This message and the information contained herein is
> proprietary and confidential and subject to the Tech Mahindra policy
> statement, you may review the policy at
> http://www.techmahindra.com/Disclaimer.html externally
> http://tim.techmahindra.com/tim/disclaimer.html internally within
> TechMahindra.
>
>
> 
>


Recommendation for upgrading from PostgreSQL 9.3

2018-11-12 Thread Karl Martin Skoldebrand
Are there any recommendations regarding upgrading from PG 9.3 to 9.6 or 10.x?
I found a few changes at 
https://severalnines.com/blog/upgrading-your-database-to-postgresql-version-10 
but are there more things to keep in mind regarding changes in scripts/queries 
that might affect an already existing application? Should we stop at 9.6 or go 
10.x considering that 10.x seems almost about a year old, and 11.x is out there.
I have limited experience with PG so far, but quite long experience with MySQL 
and OSS in general.

Best regards,

Martin Skjoldebrand



Disclaimer:  This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html 
 externally 
http://tim.techmahindra.com/tim/disclaimer.html 
 internally within 
TechMahindra.