PostgreSQL pgces-02 practice test

PostgreSQL CE 8 Silver Exam


Question 1

Select two correct statements from below concerning the ANALYZE command.

  • A. It renews the statistical information of the table content.
  • B. It takes some time to execute, but it does not lock the table.
  • C. If the FULL option is used when executing, the size of the file can be reduced.
  • D. If ANALYZE is insufficient, the most efficient search plan will not be selected for queries.
  • E. If ANALYZE is not used at all, there are times when it becomes impossible to see any of the data.
Answer:

A, D

Discussions
0 / 600

Question 2

psql generated the following error message: psql: could not connect to server: Connection was
refused Is the server running on host "server.example.com" and accepting TCP/IP connections on
port 5432? Select two reasons that are NOT the cause of this error.

  • A. Host "server.example.com" does not exist.
  • B. The PostgreSQL server is not running on "server.example.com".
  • C. The PostgreSQL server is not accepting TCP/IP connections on "server.example.com".
  • D. The PostgreSQL server is running on a port other than 5432 on "server.example.com".
  • E. The username and/or password are incorrect.
Answer:

A, E

Discussions
0 / 600

Question 3

Select a correct SQL command to change existing user "george"'s password to "foobar".

  • A. ALTER USER george WITH PASSWORD 'foobar';
  • B. ALTER USER george CHANGE PASSWORD 'foobar';
  • C. ALTER USER george SET PASSWORD 'foobar';
  • D. SET USER george PASSWORD TO 'foobar';
  • E. SET USER george ALTER PASSWORD 'foobar';
Answer:

A

Discussions
0 / 600

Question 4

Select two suitable statements regarding a postmaster process.

  • A. A postmaster process waits for client connection requests.
  • B. A postmaster process receives and processes database queries.
  • C. A postmaster process creates a child process which processes the given queries.
  • D. A postmaster process collects statistical information.
  • E. A postmaster process is created for each client connection.
Answer:

A, C

Discussions
0 / 600

Question 5

A pg_hba.conf file is set up as follows. local all all md5 host all all 127.0.0.1/32 md5 host all all
172.16.1.0/24 md5 When user foo connects to database bar from host IP address 172.16.1.2, I would
like password verification to not be performed. Select one appropriate line for the new pg_hba.conf
file.

  • A. Add "host foo bar 172.16.1.2/32 trust" to the first row.
  • B. Add "host bar foo 172.16.1.2/32 trust" to the first row.
  • C. Add "host foo bar 172.16.1.2/32 trust" to the last row.
  • D. Add "host bar foo 172.16.1.2/32 trust" to the last row.
  • E. The settings are fine as is.
Answer:

B

Discussions
0 / 600

Question 6

Select two statements that the command below DOES NOT do.
Note: $ is the command prompt. $ pg_dump -b -F c b > d

  • A. Backs up the "b" database to the "c" file, and stores error messages to the "d" file.
  • B. Backs up the "b" database to the "d" file.
  • C. Backs up large objects.
  • D. Backs up the "c" database to the "d" file as the "c" user.
  • E. Creates a backup, which is restorable with the pg_restore command.
Answer:

A, D

Discussions
0 / 600

Question 7

Select one SQL statement that will cause an error.

  • A. SELECT version;
  • B. SELECT current_user;
  • C. SELECT current_date;
  • D. SELECT current_timestamp;
  • E. SELECT current_database();
Answer:

A

Discussions
0 / 600

Question 8

Select one incorrect statement from the below about a database cluster.

  • A. It is possible to have multiple databases within a database cluster.
  • B. A database cluster is created using initdb command.
  • C. Each host can have only one database cluster.
  • D. Special databases called template0 and template1 are created in a database cluster by default.
  • E. When a database cluster is created, a database superuser is registered using the username of the OS at the time of creation unless otherwise designated.
Answer:

C

Discussions
0 / 600

Question 9

Select two commands used to check the syntax of the ALTER TABLE statement in psql.

  • A. \h ALTER TABLE
  • B. \h ALTER
  • C. \ ALTER TABLE
  • D. \ ALTER
  • E. HELP ALTER TABLE;
Answer:

A, B

Discussions
0 / 600

Question 10

Select two correct statements about the command shown below. Note: $ is the command prompt. $
vacuumdb -az

  • A. Recovers unused areas from all of the databases.
  • B. Collects statistical information related to the table content for all of the databases.
  • C. Processes the job equivalent of the VACUUM FULL command for all of the databases.
  • D. Processes the job equivalent of the VACUUM VERBOSE command for all of the databases.
  • E. The database can not be accessed until this command is finished.
Answer:

A, B

Discussions
0 / 600
To page 2