pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
setting -i and -N 100 when starting postmaster
5+ messages / 4 participants
[nested] [flat]

* setting -i and -N 100 when starting postmaster
@ 2014-07-16 19:40  John Scalia <jayknowsunix@gmail.com>
  0 siblings, 3 replies; 5+ messages in thread

From: John Scalia @ 2014-07-16 19:40 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

My wonderful colleagues in charge of our production database have screwed up royally. They managed to corrupt the production database by having two instances of postgresql talking 
to the same database/same filesystem/same time. Now, they'd like me to fix it. Sigh...

BTW, this is a V9.2.2 system, and the database will still start, but the logs are full of reports pf invalid page header errors. One thing I'm looking at is doing a "ps -ef | grep 
postmaster", I see "service postgresql-9.2 start" uses:

postmaster -D /opt/datacenter -i -N 384 -p 5431

Now, I know what the -D and -p are doing, but I'm not sure what -i and -N are for, and my internet search hasn't turned up much. Anybody know?
--
Jay

PS. Any suggestions beyond setting zero_damaged_pages=true and then running a vacuum would also be appreciated.


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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: setting -i and -N 100 when starting postmaster
@ 2014-07-16 19:45  Scott Whitney <scott@journyx.com>
  parent: John Scalia <jayknowsunix@gmail.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Scott Whitney @ 2014-07-16 19:45 UTC (permalink / raw)
  To: John Scalia <jayknowsunix@gmail.com>; +Cc: pgsql-admin

-i is "interactive," as in "listen on TCP/IP" 
-N 384 is max connections 384 

----- Original Message -----

> Hi all,

> My wonderful colleagues in charge of our production database have screwed up
> royally. They managed to corrupt the production database by having two
> instances of postgresql talking
> to the same database/same filesystem/same time. Now, they'd like me to fix
> it. Sigh...

> BTW, this is a V9.2.2 system, and the database will still start, but the logs
> are full of reports pf invalid page header errors. One thing I'm looking at
> is doing a "ps -ef | grep
> postmaster", I see "service postgresql-9.2 start" uses:

> postmaster -D /opt/datacenter -i -N 384 -p 5431

> Now, I know what the -D and -p are doing, but I'm not sure what -i and -N are
> for, and my internet search hasn't turned up much. Anybody know?
> --
> Jay

> PS. Any suggestions beyond setting zero_damaged_pages=true and then running a
> vacuum would also be appreciated.

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

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: setting -i and -N 100 when starting postmaster
@ 2014-07-16 19:49  Ray Stell <stellr@vt.edu>
  parent: John Scalia <jayknowsunix@gmail.com>
  2 siblings, 1 reply; 5+ messages in thread

From: Ray Stell @ 2014-07-16 19:49 UTC (permalink / raw)
  To: John Scalia <jayknowsunix@gmail.com>; +Cc: pgsql-admin


On Jul 16, 2014, at 3:40 PM, John Scalia <jayknowsunix@gmail.com> wrote:
> 
> postmaster -D /opt/datacenter -i -N 384 -p 5431
> 
> Now, I know what the -D and -p are doing, but I'm not sure what -i and -N are for, and my internet search hasn't turned up much. Anybody know?

$ postmaster —help

Attachments:

  signature.asc (application/pgp-signature, 235B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: setting -i and -N 100 when starting postmaster
@ 2014-07-16 20:16  John Scalia <jayknowsunix@gmail.com>
  parent: Ray Stell <stellr@vt.edu>
  0 siblings, 0 replies; 5+ messages in thread

From: John Scalia @ 2014-07-16 20:16 UTC (permalink / raw)
  To: Ray Stell <stellr@vt.edu>; +Cc: pgsql-admin

Thanks all, I've just never set those options.

On 7/16/2014 3:49 PM, Ray Stell wrote:
> On Jul 16, 2014, at 3:40 PM, John Scalia <jayknowsunix@gmail.com> wrote:
>> postmaster -D /opt/datacenter -i -N 384 -p 5431
>>
>> Now, I know what the -D and -p are doing, but I'm not sure what -i and -N are for, and my internet search hasn't turned up much. Anybody know?
> $ postmaster —help
>
>



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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: setting -i and -N 100 when starting postmaster
@ 2014-07-16 22:05  Tom Lane <tgl@sss.pgh.pa.us>
  parent: John Scalia <jayknowsunix@gmail.com>
  2 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2014-07-16 22:05 UTC (permalink / raw)
  To: John Scalia <jayknowsunix@gmail.com>; +Cc: pgsql-admin

John Scalia <jayknowsunix@gmail.com> writes:
> My wonderful colleagues in charge of our production database have screwed up royally. They managed to corrupt the production database by having two instances of postgresql talking 
> to the same database/same filesystem/same time. Now, they'd like me to fix it. Sigh...

Just outta curiosity, how'd they do that?  There are interlocks that are
supposed to prevent it.

You can defeat the interlocks by manually deleting the postmaster lock
file, which is why you're *never* supposed to do that.  I'm curious if
they did that, or found some new way.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2014-07-16 22:05 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 19:40 setting -i and -N 100 when starting postmaster John Scalia <jayknowsunix@gmail.com>
2014-07-16 19:45 ` Scott Whitney <scott@journyx.com>
2014-07-16 19:49 ` Ray Stell <stellr@vt.edu>
2014-07-16 20:16   ` John Scalia <jayknowsunix@gmail.com>
2014-07-16 22:05 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox